[Development] QProperty and library coding guide

Volker Hilsheimer volker.hilsheimer at qt.io
Thu Jul 16 13:04:58 CEST 2020

> On 16 Jul 2020, at 12:41, Friedemann Kleint <Friedemann.Kleint at qt.io> wrote:
> Hi,
>> QProperty can be exposed to the meta object system, and behaves just
>   like a getter/setter/signal property there.
>> Rather, the focus is currently on classes in QtCore, QtNetwork, and
> QtGui
> QtGui's QAction is relevant for Qt Designer. This would be a test case for the compatibility.

Yep, some interesting corner cases in that one, and making sure that the new framework handles some of those well is part of the exercise.

But we don’t have to be "all or nothing” on any class; old and new properties can be mixed. Some of the more complicated properties won’t fit into the QProperty design, and they can stay as they are, just not supporting binding. That’s fine, QAction::iconVisibleInMenu for example is maybe not the kind of property that requires bindings.

It is a documentation challenge, but I suppose qdoc can be made to generate an explicit “bindable” statement to each QProperty-fied property.


More information about the Development mailing list