PDA

View Full Version : How to use the QProcess to execute the Browser ?



eric0214
17th November 2009, 07:01
Hello,all


I have a question about use theQProcess

to execute the Browseron the Qt4.5.1for

embedded Linux.



My main program is Buttontest, and when I

press the button in it, it will execute the Browser program whit QProcess. I

use the Qt Demo Browser, and the function is ok on X11.



After that, I try to port this simple

program to my target board(a MIPS embedded board).




When I type the ./Buttontest –qws and ./

browser –qws, it all work fine.



But when I press the button in the

Buttontest program, it does not execute the Browser ,and Qt return the messeage:” Did

not receive a connection event from the qws server .” ?(







How to resolve this problem? Do I need to

modify the code?



I just hope can execute another Qt software

in my main program on the Embedded board.




Sorry about my poor English and thanks for

your Help.

Below is the code

to execute the Browser.






if(sender()->objectName()=="Button1")

{




QProcess process;

process.execute("./browser");

}




Eric Chien

phillip_Qt
17th November 2009, 07:09
I think u can open it by using
QDesktopServices::openUrl(QUrl("www.google.com", QUrl::TolerantMode));

yogeshgokul
17th November 2009, 07:18
I think u can open it by using
QDesktopServices::openUrl(QUrl("www.google.com", QUrl::TolerantMode));
Isnt the name says, its only for desktops. ;)
And he is asking it for MIPS. :D