[Solved] How do I use Creator with C++?
-
I've recently started using Qt Creator 2.2.1. I've had no problem going through the first few modules in Qt Quick for Designers, but everything's in QML.
What I'm trying to do now is develop something, anything in C++. I've seen the short Hello World program in several places and have tried to get it to work. If you aren't familiar, here's the program:
@#include <QtGui/QApplication>
int main(int argc, char argv[])
{
QApplication app(argc, argv);
QPushButton button = new QPushButton("Hello There");
button->show();
return app.exec();
}@This is as simple as it gets, but I can't get it to run in Creator. I've created a new project using Qt Quick Project -> Qt Quick Application. I get an error on the #include statement.
-
Apparently the additional include statement got me what I needed. Thanks so much for the help. One last question, though: I thought when I clicked on the button, it would terminate the application. I can click it as many times as I want, but the app doesn't end.
-