This book is written for Qt 4.xx and you are using Qt 5.xx
To get run this example follow next step:
1. create a directory Hello
2. copy the files
(hello.pro)
TEMPLATE = app
SOURCES = hello.cpp
TEMPLATE = app
SOURCES = hello.cpp
To copy to clipboard, switch view to plain text mode
-and-
(hello.cpp)
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
label->show();
return app.exec();
}
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
-in this directory.
3. in Creator change the Settings: Tools->Create and Run->Kits->User Defined click on Desktop and change
Qt-Version: from Qt 5.x in Qt 4.x
Bookmarks