QApplication is a part of QtGui module, so you can't disable this module if you want to use it:
QT -= gui
If you dont want gui module, use QCoreApplication.
like cv.h and highgui.h.
Do you have files cv.h and highgui.h in directories specified in INCLUDEPATH variable ?