PDA

View Full Version : QTest dir not included by qmake



allstar
20th June 2007, 10:59
Hi,

I would like to use the QTest class, but qmake doesnt include the QTest header directory as u can see below

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.2.2/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtNetwork -I/usr/local/Trolltech/Qt-4.2.2/include/QtNetwork -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include -I. -I. -o mainwindow.o mainwindow.cpp

my *.pro file:

HEADERS = mainwindow.h \
mdichild.h \
ttscp.h
SOURCES = main.cpp \
mainwindow.cpp \
mdichild.cpp \
ttscp.cpp
RESOURCES = phoenix.qrc
QT += network thread
# install
target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS phoenix.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi
INSTALLS += target sources

Please, what I have to add to *.pro file to include the QTest dir?
Thanks a lot.

jpn
20th June 2007, 11:10
To add proper include paths and to link against the QtTest module, add this line to your qmake .pro file:

CONFIG += qtestlib