Reset a QML property from Javascript
-
Is there a way to reset a property in QML from Javascript? Apparently the way to reset a property in QML is to assign undefined to it, but attempting to do it from Javascript is resulting in type errors ("can't assign undefined to int", "can't assign undefined to double"). I've also tried null with the same results.
-
@EddieC said in Reset a QML property from Javascript:
reset a property in QML
https://doc.qt.io/archives/qt-5.9/qml-qtquick-propertychanges.html
-
@Markkyboy said in Reset a QML property from Javascript:
https://doc.qt.io/archives/qt-5.9/qml-qtquick-propertychanges.html
So, the only way would be to create a dummy state with the PropertyChange and to activate the state? No way to act directly on the property?
-
@EddieC
on what properties did you try it exactly?
maybe the property does not have a reset method defined?