Momergil
14th July 2013, 18:21
Hello!
I'ld like to know if there is a macro that is defined always when Qt is used in a project/file. I mean, if a #include <QtSomething> is used in a .h or .cpp, is there a macro that it's automatically defined/set to true so one could identify in the code if Qt is being used or not?
To give some context, I'm creating a .h with a set of general defines that I'ld like to use in a standarized form in my applications, some of which may not actually include Qt. Since some of the definitions I'm including in my .h requires Qt to be included, I'ld like to put them inside a macro that will only 'activate' them if Qt is being used:
//.h
#if QT_IS_USED
#define xxxx
#define yyy
#endif
Thanks,
Momergil
I'ld like to know if there is a macro that is defined always when Qt is used in a project/file. I mean, if a #include <QtSomething> is used in a .h or .cpp, is there a macro that it's automatically defined/set to true so one could identify in the code if Qt is being used or not?
To give some context, I'm creating a .h with a set of general defines that I'ld like to use in a standarized form in my applications, some of which may not actually include Qt. Since some of the definitions I'm including in my .h requires Qt to be included, I'ld like to put them inside a macro that will only 'activate' them if Qt is being used:
//.h
#if QT_IS_USED
#define xxxx
#define yyy
#endif
Thanks,
Momergil