[Development] New property system

Thiago Macieira thiago.macieira at intel.com
Tue Sep 1 16:12:58 CEST 2020


On Tuesday, 1 September 2020 02:54:49 PDT Lars Knoll wrote:
> > If it's only for compatibility, what should one write in the Q_PROPERTY
> > header for new properties?
> 
> As said, it’s for both old and new properties in QObjects. What you need to
> do to convert a property and make it bindable is to add the one method, and
> add a “BINDABLE bindableFoo” section in the Q_PROPERTY macro. The second
> part is only required so that QMetaProperty also knows about the
> bindability. Setting up a binding from C++ does only require the
> bindableFoo() accessor.

Sorry, I wasn't very clear.

For new properties and especially in new classes, is there a preferred syntax 
that doesn't have to keep compatibility?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list