QT_DEBUG define is not working in Header files
-
wrote on 10 May 2015, 17:32 last edited by SGaist
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. -
wrote on 13 May 2015, 01:26 last edited by ManhNT
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 :)
1/3