title: Detect if qt is running a debug build at runtime
body: <p>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? </p>
  
  <p>I know about the <a href="http://www.qtforum.org/article/35913/detect-debug-or-release-mode.html" rel="noreferrer">QT_NO_DEBUG macro</a>, but that is resolved at build time for Qt.</p>
  
  <p>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. </p>
  
  <p>Example 2: I have a command line argument parser written in pyqt. It wants to print program help. How does it find out if QApplication will support the -sync switch or not from within pyqt. If I had info on the build type, I could add or remove -sync easily from the list of arguments the program understands.</p>