Global Qt Element Source Code
-
I've been trying to find the source code for the Global QML Element Qt which has the functions for dynamically creating objects in QML such as Qt.createComponent() or Qt.createQMLObject. More info on this is found "here":http://qt-project.org/doc/qt-4.8/qml-qt.html
I'm trying to create a custom QML type that creates dynamic objects in C++. I have successfully created the objects and they are displaying correctly on the screen. The problem is that the parent/child relationship doesn't seem to work between them since I can't access any parent variables in the child. I'm hoping that finding the source code to the Global Qt Element will help me understand this better.
Thanks for any help.
-
See the qqmlbuiltinfunctions.cpp file under src/qml/qml/v8 in current stable: https://qt.gitorious.org/qt/qtdeclarative/source/387e8720fcbc60cd1798c9356a91d88077569c72:src/qml/qml/v8/qqmlbuiltinfunctions.cpp
Note that some of those function implementations just perform argument marshalling and then call out to the actual implementations from other plugins (eg, the QQuickColorProvider implementation of the "lighter()" function).
Also, in dev branch, the implementations will have changed dramatically, due to v4vm.
Cheers,
Chris.