> Sent: Thursday, September 26, 2019 at 11:44 AM > From: "Simon Hausmann" <simon.hausm...@qt.io> > To: "Mitch Curtis" <mitch.cur...@qt.io> > Cc: "development@qt-project.org" <development@qt-project.org> > Subject: Re: [Development] Property bindings in Qt 6 > > Hi, > > Yeah, custom setters are required. > > One option would be to say that such properties are implemented using the > traditional property system altogether — bridging will be necessary anyway. > > Another option would be to implement what you described, perhaps in a more > convenient way though. > > Simon
It looks pretty cool so far. Forgive me as I don't know the internals of QML as well as I should, but what about if you could set a std::function lambda as a custom setter, and if set that code runs? Or something similar? QProperty<QString> firstname("John" /* to be set with custom setter*/, /* custom setter*/ [&]{ value=md5sum(value); emit valueChanged(value) } ); Or set it as a member function later, but that would be messy unless you had a subclass to always do it. Feel free to ignore any or all of this, just thinking out-loud. _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development