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?
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?
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:
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".Qt 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.cppTo copy to clipboard, switch view to plain text mode
Thanks, you resolved my doubts.
Bookmarks