5

QT3 Problem

view full story
linux-howto

http://www.linuxforums.org – I am new to GUI programming, while surfing through trolltech i find this tutorial. I tried several ways but couln't make it run. can somebody help please ??? Here is the code : Code: /*         A small program to demonstrate QT         FileName : main.cpp */ #include <qapplication.h> #include <qpushbutton.h> int main(int argc, char *argv[]) {         QApplication app(argc, argv) ; //application created         QPushButton button1("hello world", 0) ; //button created params - caption, parent 0 for no parent         button1.resize(100, 30) ; //resize params - width, height         app.setMainWidget(&button1) ; //not necessary but every application should have a main widget         button1.show() ;         return app.exec() ; } then i do the following qmake -project qmake make chmod +x main.o ./main.o the out come is this : "bash: ./main.o: cannot execute binary file" (HowTos)