Detect if qt is running a debug build at runtime
问题 How can I detect from within a QObject at runtime whether or not the Qt it's linked against is a debug build or release build? I know about the QT_NO_DEBUG macro, but that is resolved at build time for Qt. Example 1 of when this would be useful: I have a plugin that acts as a crash handler, providing a backtrace. I only want this plugin to attempt to do all this work if the qt debug symbols are available. Example 2: I have a command line argument parser written in pyqt. It wants to print