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:
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
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
To copy to clipboard, switch view to plain text mode
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".
Bookmarks