I want to add the “QGCApplication.cc” file to the module “QGroundControl 1.0” so that I can boot the application remotely from a different QML file by calling the _initforNormalAppBoot() function. Any idea how I can do this? Where is this module created?
The other modules (with QML flies) have qmldir files which are easily accessible but I can’t find this module.
Also, is it possible for me to access the QML Objects/variables in the file “QGCApplication.cc”, or any other (.h)/(.cc) file for that matter? That’ll make the job much easier.
Thanks in advance!
Hard to understand how to answer. What you are asking for doesn’t really make sense. The
QGroundControl module exposes the QGroundControlQmlGlobal C++ class not qml controls. So there is no qmldir.
You can expose anything from C++ to Qml using the Qt property system. There is much Qt docs available on how to do that.
Right, that’s what I was asking for. The file where I could edit and add a class for “QGCApplication.h”. Thanks a lot!
All right, I’ll look into that as well. I’m new to QML, so a bit slow in understanding.
But my question was regarding the other way round. Is it possible to expose anything from QML to C++? For example, if I could expose a button from one of those QML pages to “QGCApplication.h”, I could modify the any function in “QGCApplication.h itself” by allowing it to proceed only if the button is clicked.