[Development] QProperty and library coding guide

Ulf Hermann ulf.hermann at qt.io
Fri Jul 17 19:12:49 CEST 2020


>> I've added a section to this one. Feel free to amend. However, newly
>> designing APIs with QProperty is a different thing than converting old
>> APIs in a compatible way.
> 
> The complexity behind the scenes for us to support it is our problem, users
> shouldn't care.
> 
> They will only care that the code they write is the same, regardless of
> whether it's an old or a new class.

Indeed the users shouldn't need to care. And they shouldn't use change 
signals. Rather, they should use subscribe(), and only if they cannot 
express the same thing using a binding. This way we can get rid of the 
notified properties in the long run.

So, new, QProperty-based, properties should not have change signals. 
That is something users may notice, and something that needs to be added 
to the API design principles.

best,
Ulf


More information about the Development mailing list