OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: china_cup on July 19, 2004, 07:14:08 am

Title: How to call a executable file in Qt???
Post by: china_cup 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.
Title: How to call a executable file in Qt???
Post by: Omicron 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
Title: How to call a executable file in Qt???
Post by: china_cup 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.
Title: How to call a executable file in Qt???
Post by: zautrix 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.
Title: How to call a executable file in Qt???
Post by: china_cup 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.