[Development] The future of QProperty and QBindable

Ulf Hermann ulf.hermann at qt.io
Fri Mar 7 12:27:45 CET 2025


On 3/7/25 10:48, Schimkowitsch Robert wrote:
> We widely use BINDABLE in Q_PROPERTY (>500 places) because it removes a lot of boilerplate from our C++ classes.
 > [...]
> I have never had any issues using BINDABLE. I have avoided using them in complex situations, true, but for the simple use case I outlined, they were just a major improvement over READ/WRITE/NOTIFY.

There is "Q_PROPERTY(qreal x MEMBER m_x NOTIFY xChanged)" for the really 
simple cases.

With that you don't need to write any accessors at all. Not even the 
bindable accessor.

best,
Ulf


More information about the Development mailing list