Author Topic: How to call a executable file in Qt???  (Read 3483 times)

china_cup

  • Newbie
  • *
  • Posts: 14
    • View Profile
How to call a executable file in Qt???
« on: July 19, 2004, 07:14:08 am »
I want to call an existing executable file in Qt,but don't know how to do it.

Omicron

  • Hero Member
  • *****
  • Posts: 608
    • View Profile
    • http://
How to call a executable file in Qt???
« Reply #1 on: July 19, 2004, 07:21:47 am »
Goto System Tab, open ADD TABS.

Add a new TAB and then put in the name of the program.  Full path is not ussually necessary.

OR

Open KONSOLE OR TERMINAL (Install if needed) at # prompt type name of executable (may need full path).
If you get access denied or some such, try typing # su - root
Hit enter for pasword
"You Shall Not Pass"    
....Gandalf, Lord Of The Rings
--------------------------------------------------------------
C-860 (Cacko), 3x4gb MD  
DLINK 660W, 1GB SD,  
Upgraded Archos AV320 w/80GB HDD
Pocketop and Targus IR keyboards
Favorite Deal Site: SaveCity.net (pretty cool, good deals daily on one page)

china_cup

  • Newbie
  • *
  • Posts: 14
    • View Profile
How to call a executable file in Qt???
« Reply #2 on: July 19, 2004, 07:30:49 am »
Excuse me ,I cannot understand what you had just told me ,can you say it more details.I want to call the programme in an Qt slot.

zautrix

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • http://www.pi-sync.net
How to call a executable file in Qt???
« Reply #3 on: July 19, 2004, 08:58:11 am »
Quote
I want to call an existing executable file in Qt,but don't know how to do it.
You have to call something like this:

QString tempfilename = "xxxxx";
 if ( vfork () == 0 ) {
        execl ( tempfilename.latin1(), 0 );
        return;
        }
return;

Please read docu about vfork and execl to get more info

z.

china_cup

  • Newbie
  • *
  • Posts: 14
    • View Profile
How to call a executable file in Qt???
« Reply #4 on: July 20, 2004, 04:58:37 am »
I finally found the answer ,I used the class QProcess,than everything is selltled.Though
I still don't know about replys,thank you all the same.