hi,
im using qt3 ryt now, im trying to call an executable file using qprocess
the executable is a movie player but the movie is on the other computers database so it uses socket..
proc->addargument("-i");
..//and many more addarguments cause it is required by the executable
proc->start();
QProcess *proc= new QProcess(executablepath);
proc->addargument("-i");
..//and many more addarguments cause it is required by the executable
proc->start();
To copy to clipboard, switch view to plain text mode
the executable shows but closes immediately after starting..
if i run the application with the arguments manually, it shows and does not close immediately..
Now what could be the problem?
the executable?
the arguments? cause some of the arguments are path like bin/directory/ i did not change the / to // or to \
my code?
if i run the executable manually it goes like this:
./myplayer -i 100.000.0.1 -p 4000 -k ./bin/directory/ -t 5
in my codes it goes like this:
QProcess *proc
= new QProcess("./myplayer");
//i just put the ./myplayer to fast understanding proc->addargument("-i");//ip
proc->addargument("100.000.0.1");
proc->addargument("-p");//port
proc->addargument("4000");
proc->addargument("-k");//directory
proc->addargument("./bin/directory/");
proc->addargument("-t");//socket timeout
proc->addargument("5");
proc->start();
QProcess *proc = new QProcess("./myplayer"); //i just put the ./myplayer to fast understanding
proc->addargument("-i");//ip
proc->addargument("100.000.0.1");
proc->addargument("-p");//port
proc->addargument("4000");
proc->addargument("-k");//directory
proc->addargument("./bin/directory/");
proc->addargument("-t");//socket timeout
proc->addargument("5");
proc->start();
To copy to clipboard, switch view to plain text mode
how to solve this?
Bookmarks