Hi,
 
The question is all about QtQml 2.15 Binding type. The infamous missing
unexported `restoreMode` property sure makes our lifes slightly harder
than it should be (by generating warnings if left out); but when it
comes to choosing an appropriate value for it -- I am totally lost.
 
Note that documentation doesn't come with any examples for restoreMode.
 
Why are there so many options to choose from? In which situation one is more
useful than another? Why would you select one over the other?
 
I can only partially answer this question. In a Plasma applet called Notes,
which is as you might guess just a note-taking piece of rectangle on a
desktop, Binding on a text content was generating a warning, so I specified
the restoreMode explicitly, rebuilt kdeplasma-addons, restarted Plasma,
clicked on a note to test it... and lost it all. Like, all the content was
gone when I just focused the cursor on a text field! Apparently, it relied on
a specific restore mode which is not the Binding.RestoreBindingOrValue as
promoted by "Qt >= 6.0 ..." warning message. [1]
 
Also, any reason as to why Binding is `setValue(const QJSValue &)`, but
QQuickPropertyAction is `setValue(const QVariant &v)`? I mean, QJSValue vs
QVariant differences.
 
[1]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/90
 
--
ivan (@ratijas)
 
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to