July 7, 2011

duandcwpkt duandcwpkt
Lab Rat
2 posts

How to use QProcess to open Safari on Mac

 

On Mac OS X, I try to use the code like this: QProcess::startDetached(”/Applications/Safari.app”) to open Safari, but it doesn’t work! I also cut the extension to “/Applications/Safari”, also doesn’t work! Do somebody know why? and what’s the correct method?

2 replies

July 7, 2011

t3chNo t3chNo
Lab Rat
55 posts

i don’t know about mac but if you just want to open an url, you can use QDesktopServices::openUrl(QUrl).

July 7, 2011

dakron dakron
Lab Rat
34 posts

Try with /Applications/Safari.app/Contents/MacOS/Safari

 
  ‹‹ Linux QtSDK && Debugging helper problem [Solved]      ShortCut doesn’t work on MAC OS X ››

You must log in to post a reply. Not a member yet? Register here!