Is it possible to know if a application is running on debug or release inside QML?
At Qt/C++ there is QT_DEBUG define macro to know when it is compiled at debug or release, but at QML, is there any method to know if is the application running in debug o release mode?
Thanks,
Re: Is it possible to know if a application is running on debug or release inside QML
You could export that as a context property.
Any specific reason why the QML code needs to know whether the C++ part is built in debug or release mode?
Cheers,
_
Re: Is it possible to know if a application is running on debug or release inside QML
Because I want to hide some buttons and configurations from release mode.
Thanks for your answer. Context property solved.
Code:
#ifdef QT_DEBUG
viewer.rootContext()->setContextProperty("debug", true);
#else
viewer.rootContext()->setContextProperty("debug", false);
#endif
Quote:
Originally Posted by
anda_skoa
You could export that as a context property.
Any specific reason why the QML code needs to know whether the C++ part is built in debug or release mode?
Cheers,
_