View Full Version : <QtGui/QApplication> vs. <QApplication>
seneca
12th January 2006, 14:38
Whenever Qt designer 4.1 creates ui code the includes are generated as #include <QtGui/QApplication>, however documentation suggests to use #include <QApplication> instead.
What are the advantages/disadvantages of both variants, and which should be used to stay compliant with future versions?
wysota
12th January 2006, 14:43
It's completely the same. It's better to use <QApplication> as it is not vulnerable to a situation when directory structure of includes changes, but you may use both now.
axeljaeger
12th January 2006, 17:41
I have an argument pro <QtGui/QApplication>: On Macintosh-plattform, it is common to include headers in the way <framework/headerfile>. e.g. <OpenGL/gl.h>. <QtGui/QApplication> does also match that pattern. This is only important if you use Qt as frameworks on macintosh. The other way works fine when using a regular static or shared library.
dimitri
15th January 2006, 11:43
The "official" documented way is to include <QApplication> but <QtGui/QApplication> works as well.
katrina
17th January 2006, 01:07
how about I use "/usr/include/QtGui/QApplication.h"
?
JUST KIDDING
Katrina
blue.death
25th January 2006, 10:58
how about I use "/usr/include/QtGui/QApplication.h"
?
JUST KIDDING
Katrina
hey, this doesn't work!!!!! qt header file names are lower-case, use "/usr/include/QtGui/qapplication.h" instead!! :D
and dont forget:
#ifdef WIN32
#include "c:\my documents and settings\my text files\my include files\..\troll's include files\my qt\my qt 4\my qt 4.1\the include filesi'm looking for\QStupidApplication.h"
:rolleyes:
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.