05-30-2013 03:40 PM - edited 05-30-2013 03:43 PM
I have the below QML and C++ code and i want to point the QML container component in C++ ,
but the C++ code i write is not working for the container component having id = container. please suggest where is the problem?
QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(th
// create root object for the UI
Page *root = qml->createRootObject<Page>();
QObject *container = root->findChild<QObject*>("container");
Solved! Go to Solution.
05-30-2013 03:44 PM
The ID is how you refer to it in QML. objectName is the property you need to refer to it in C++.