Solved QT_DEBUG define is not working in Header files
-
Hello Everyone, I'm using Qt 4.8.6 on Windows 7 32bit and this seems strange that I can't use
QT_DEBUG define in header files, but it still works in my .cpp file of the same project (under the Debug configurations)
Screenshot: http://s24.postimg.org/vt588quac/image.jpg
Does anyone know how to fix the problem? -
Hi and welcome to devnet,
You should
#include <QtGlobal>
if you don't have any other Qt related includes in your header file. -
Hi and welcome to devnet,
You should
#include <QtGlobal>
if you don't have any other Qt related includes in your header file. -
Ah, that actually works. My header didn't include anything from Qt but my source file did, that was why it only worked with .cpp file. Thank you :)