Dynamic Q_PROPERTY Read / Write function ?
-
Hi!
I have created some dynamic properties in my C++ class.
Is it possible to read the value of such a dynamic property from qml?
In qml I get noticed if the dynamic properties change, because of the onPropertyChanged signal.
But I want to read the value of a dynamic property once when the qml componentd was created (Component.onCompleted).
Has anyone an idea how I can do this?Kind regards,
MHermann -
Pretty sure that will show you what you need.
http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.htmlYou can also jump straight into code and start tinkering - it's an example application. Just go to the Qt Creator welcome screen, examples and search "Writing QML Extensions with C++"
-
Pretty sure that will show you what you need.
http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.htmlYou can also jump straight into code and start tinkering - it's an example application. Just go to the Qt Creator welcome screen, examples and search "Writing QML Extensions with C++"