Get the root object from QML
I have a QML project with the following code in main.cpp
QApplication app(argc, argv);
How do I get the rootObject so I can access the QML elements to do C++ bindings, all the examples that I have seen , they load the QML with QQuickView, so is it possible to get the root object from QQmlApplicationEngine?.
i bet the time writing this post took longer than it would have to check the docs for what you want ;)
Pradeep P N
use engine.rootObject() method to get the list of objects.
You gotta be kidding me, that's all I wasted hours trying to do that, I checked the documentation and "googled" it, I have no idea how I missed that.