What's the difference beetwem those two notations in including Qt's header files?
I see in QtCreator and documentation this way:
#include <QtGui/QWidget>
Why not just
#include <QWidget>
I do not remeber if it is related with c++ syntax... maybe namespaces or something?
Re: What's the difference beetwem those two notations in including Qt's header files?
There's no difference from a user perspective except that one is shorter to type. They both identify the same file called QWidget. On my Linux machine qmake supplements the compiler include path with:
Code:
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED \
-I/usr/share/qt4/mkspecs/linux-g++ \
-I. \
-I/usr/include/qt4/QtCore \
-I/usr/include/qt4/QtGui \
-I/usr/include/qt4 \
-I. -I. -o main.o main.cpp
for a simple GUI program. The first include style will find the file via "/usr/include/qt4", the second style via "/usr/include/qt4/QtGui".
Re: What's the difference beetwem those two notations in including Qt's header files?
Thanks, you resolved my doubts.