On Tuesday 21 March 2017 23:49:17 Thiago Macieira wrote: > So we need the compile-time checking. What can we use to identify the > property changing? A read-only property that changes has two C++ > identifiers: the getter and the notify signal. And what can we use to > identify the receiving property? The getter and the setter. > > So this new functionality would be: > > QObject::bind(sender, &Sender::signalName, receiver, > &Receiver::setter); > > This is exactly connect() we already have.
The challenge is executing a lambda or a slot when any of the depending properties changes. That's what the QML engine has, and what Olivier blogged about in 2013: https://woboq.com/blog/property-bindings-in-cpp.html E.g. imagine that you have two sliders, and the text that you need to display in a label depends on both. You need to connect to two signals, because you depend on two properties. -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest