compiling qt c++ code with c4droid and android tablet

Hello!
I’m using C4droid and learning qt for the first time. I just want to know if:
A. Could I still use qt 3 or qt 4 gui and programming examples? The reason I ask because I typed in this basic of all codes example
1
2
3
4
5
6
7
8
9
10
11
#include  <qapplication.h>
#include  <qlabel>
 
int main(int argc, char *argv[])
{
 QApplication app(argc, argv);
 QLabel *label = new QLabel("Hello Qt!", 0);
 app.setMainWidget(label);
 label->show();
 return app.exec();
}

And got this Message:

No such file or directory #include <qapplication.h>

I even tryed to remove the dot h and still the same results
question B. Where can I get all the examples on qt 5.3 Gui desidn and programming and also tutorials on how to intergrate c++ code with qml code also
Thank You
AO!
You need to add the following to the project file (*.pro) file:

QT += widgets

Please see the following article:

http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5
Topic archived. No new replies allowed.