[Development] Property bindings in Qt 6

Julien Cugnière julien.cugniere at gmail.com
Thu Sep 26 18:22:41 CEST 2019


Le jeu. 26 sept. 2019 à 17:03, Simon Hausmann <Simon.Hausmann at qt.io> a écrit :
> I would like to propose an API that replaces the setter and getter functions on objects with a new property template class that encapsulates the property value instead, and the ability to tie binding expressions to these properties for automatic updates. In short, it looks like this:

Hello Simon,

As a user, I find this project very interesting, as after learning
QML, I often found myself wanting to use some kind of binding system
when coding in C++.

One question that comes to mind when you mention lazy evaluation: how
does this interact with the "onPropertyChanged" signal? In QML, one
sometimes sees code like :

    onFullnameChanged: {
        console.log("the fullname changed!");
        foo.bar();
    }

At first glance, this doesn't seem compatible with lazy evaluation.


Julien Cugnière



More information about the Development mailing list