PDA

View Full Version : Qt3 qprocess, executable exited?



triperzonak
20th September 2008, 16:20
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..



QProcess *proc= new QProcess(executablepath);
proc->addargument("-i");
..//and many more addarguments cause it is required by the executable
proc->start();

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();

how to solve this?

jpn
22nd September 2008, 09:30
Where is "myplayer"? What is current working directory?

PS. Use QDir::current() or currentPath() to check CWD.

triperzonak
22nd September 2008, 11:21
the answer is.. the error is on the executable..

i found now the error the application is requiring a .ttf font config it should be place beside the application.. i overlook it..

thanks anyways..