Inclusion of header files from include/Qt is deprecated
#include <QApplication>
#include <QTextEdit>
int main(int argv, char **args)
{
QApplication app(argv, args);
QTextEdit textEdit;
textEdit.show();
return app.exec();
}
C:Qt4.8.0andrew>qmake -project
C:Qt4.8.0andrew>qmake
C:Qt4.8.0andrew>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/4.8.0/andrew'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -
DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..includ
eQtCore" -I"..includeQtGui" -I"..include" -I"." -I"..includeActiveQt" -I"d
ebug" -I"..mkspecswin32-g++" -o debugtutone.o tutone.cpp
In file included from tutone.cpp:1:0:
C:Qt4.8.0includeQtQapplication.h:3:10: warning: #warning "Inclusion of head
er files from include/Qt is deprecated." [-Wcpp]
In file included from tutone.cpp:2:0:
C:Qt4.8.0includeQtQpushbutton.h:3:10: warning: #warning "Inclusion of heade
r files from include/Qt is deprecated." [-Wcpp]
tutone.cpp: In function 'int qMain(int, char**)':
tutone.cpp:11:7: error: 'class QApplication' has no member named 'setMainWidget'
mingw32-make[1]: *** [debug/tutone.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.8.0/andrew'
mingw32-make: *** [debug] Error 2
######################################################################
# Automatically generated by qmake (2.01a) Thu Jan 19 12:41:21 2012
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += tutone.h
C:/Qt/4.8.0/include/Qt/Qapplication.h
../include/QtGui/qapplication.h
../src/gui/kernel/qapplication.h
C:/Qt/4.8.0/include/Qt/Qpushbutton.h
../include/QtGui/qpushbutton.h
../src/gui/widgets/qpushbutton.h
SOURCES += tutone.cpp
tutthree.cpp
../src/gui/kernel/qapplication.cpp
../src/gui/widgets/qpushbutton.cpp
QT += core gui # <-- this line
TEMPLATE = app
TARGET = ProjectNameHere
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += tutone.h
SOURCES += tutone.cpp
tutthree.cpp