Results 1 to 3 of 3

Thread: How to make .pro files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Qt products
    Qt4
    Platforms
    MacOS X
    Thanks
    42
    Thanked 1 Time in 1 Post

    Default How to make .pro files

    Hi all

    I m using Qt3.1(Linux Operating System) and tried to make Simple Hello Word Program. with the filename hello.cpp

    Here the code is:

    Qt Code:
    1. #include <qapplication.h>
    2. #include <qpushbutton.h>
    3.  
    4. int main( int argc,char **argv )
    5. {
    6. QApplication a( argc, arg v);
    7.  
    8. QPushButton hello( "Hello World!",0);
    9. hello.resize( 100, 30);
    10. a.setMainWidget( &hello );
    11. hello.show();
    12. return a.exec();
    13. }
    To copy to clipboard, switch view to plain text mode 

    when i write qmake hello.cpp at commad line

    i got:

    [root@localhost root]# qmake hello.cpp
    hello.cpp:4: Unknown test function: int main
    hello.cpp:6: Unknown test function: QApplication a
    hello.cpp:8: Unknown test function: QPushButton hello
    hello.cpp:9: Unknown test function: hello.resize
    hello.cpp:10: Unknown test function: a.setMainWidget
    hello.cpp:11: Unknown test function: hello.show
    hello.cpp:12: Unknown test function: return a.exec

    What it mean and what should I do?
    or For this I have to make pro file
    if yes then Plese Tell me how can I make pro files


    Thanx

    Merry
    Last edited by wysota; 8th March 2007 at 10:31. Reason: missing [code] tags
    Always Believe in Urself
    Merry

Similar Threads

  1. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  2. Replies: 5
    Last Post: 22nd September 2006, 08:04
  3. make install with debug_and_release_target
    By aba in forum Qt Programming
    Replies: 0
    Last Post: 17th April 2006, 19:28
  4. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28
  5. Visual Studio 2003 and .vcproj files
    By mbjerkne in forum General Discussion
    Replies: 2
    Last Post: 1st February 2006, 00:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.