Results 1 to 12 of 12

Thread: not running the application program

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    42
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    11

    Post not running the application program

    hello all, i had made simple dilalog form in Qt designer and in that form i put the single pushbutton , then i wanted to run a application program by clicking the pushbutton

    but it is not running, and my code is like this

    Qt Code:
    1. #include<QtGui>
    2. #include<QtCore>
    3. #include<QApplication>
    4. #include"ui_MainWindow6.h"
    5.  
    6.  
    7. class image6 : public QMainWindow,private Ui::MainWindow6
    8.  
    9. {
    10. Q_OBJECT
    11.  
    12. public:
    13.  
    14. image6::image6()
    15. {
    16. setupUi(this);
    17.  
    18. connect(pushButton1,SIGNAL( click() ),this,SLOT( startxterm() ));
    19. }
    20.  
    21. private slots:
    22.  
    23. void image6::startxterm()
    24.  
    25. {
    26. // QProcess *proc;
    27. proc = new QProcess( this );
    28. // proc->start("/usr/bin/xterm");
    29. proc->execute("/usr/bin/xterm");
    30. }
    31.  
    32. private:
    33. QProcess *proc;
    34.  
    35. };
    36.  
    37.  
    38. int main( int argc, char *argv[] )
    39. {
    40. QApplication app(argc,argv);
    41. image6 *dialog6 = new image6;
    42. dialog6->show();
    43. return app.exec();
    44. }
    45.  
    46. #include "main.moc"
    To copy to clipboard, switch view to plain text mode 

    ******************************************

    and while making it giving some warning as

    /usr/local/Trolltech/Qt-4.3.2/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.2/include/QtCore -I/usr/local/Trolltech/Qt-4.3.2/include/QtCore -I/usr/local/Trolltech/Qt-4.3.2/include/QtGui -I/usr/local/Trolltech/Qt-4.3.2/include/QtGui -I/usr/local/Trolltech/Qt-4.3.2/include -I. -I. -I. main.cpp -o main.moc
    main.cpp:30: Warning: Function declaration image6::startxterm contains extra qualification. Ignoring as signal or slot.
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.2/include/QtCore -I/usr/local/Trolltech/Qt-4.3.2/include/QtCore -I/usr/local/Trolltech/Qt-4.3.2/include/QtGui -I/usr/local/Trolltech/Qt-4.3.2/include/QtGui -I/usr/local/Trolltech/Qt-4.3.2/include -I. -I. -I. -o main.o main.cpp
    g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.2/lib -o filebrowser6 main.o -L/usr/local/Trolltech/Qt-4.3.2/lib -lQtGui -L/usr/local/Trolltech/Qt-4.3.2/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread
    Last edited by marcel; 4th December 2007 at 09:15. Reason: missing [code] tags

Similar Threads

  1. Detect platform where my QT4 program is running on
    By the_bis in forum Qt Programming
    Replies: 1
    Last Post: 14th September 2007, 12:01
  2. Replies: 10
    Last Post: 11th June 2007, 09:18
  3. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19
  4. Replies: 1
    Last Post: 17th May 2006, 00:23
  5. Replies: 5
    Last Post: 16th January 2006, 05:15

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.