Hi,
I am a complete beginner in Qt. I have just installed Qt, and tried to run a simple hello world application:
#include <QApplication>
#include <QPushButton>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello World");
hello.resize(100,30);
hello.show();
return app.exec();
}
I have compiled it by doing the following:
qmake -project
qmake
make
The project compiles fine, but when I try to run it I get a segmentation fault.
If I replace the QApplication above with QCoreApplication, it works.
Can anyone tell me why this error might be occurring?
(As far as I can see, it is linking with -lQtGui fine).
Bookmarks