<Solved> Is there any constructor function for Components ? Or Init ?
-
wrote on 27 Nov 2013, 15:27 last edited by
Hi,
I would know if there is any constructor or initialisation function in QML ? an entrypoint at application start.
I can make this by calling it from c++ but I cannot believe its does not exist !
Is there anybody know ?
-
wrote on 27 Nov 2013, 16:22 last edited by
Please read document about "Defining QML Types from C++". "Any QObject-derived C++ class can be registered as the definition of a QML object type. Once a class is registered with the QML type system, the class can be declared and instantiated like any other object type from QML code."
QML objects are created by QML engine according to QML documents.
"QML Engine Internals, Part 1: QML File Loading":http://www.kdab.com/qml-engine-internals-part-1-qml-file-loading/
-
wrote on 28 Nov 2013, 14:40 last edited by
Will this be of any help? It's not clear what you exactly need.
@Item {
Component.onCompleted: {
// extra init here
}
}@ -
wrote on 28 Nov 2013, 15:26 last edited by
Thanks for answering, Sergei that was what I've been looking for, but actually I have found a different way to do it.
1/4