Because I want to hide some buttons and configurations from release mode.
Thanks for your answer. Context property solved.
#ifdef QT_DEBUG
viewer.rootContext()->setContextProperty("debug", true);
#else
viewer.rootContext()->setContextProperty("debug", false);
#endif
#ifdef QT_DEBUG
viewer.rootContext()->setContextProperty("debug", true);
#else
viewer.rootContext()->setContextProperty("debug", false);
#endif
To copy to clipboard, switch view to plain text mode

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,
_
Bookmarks