How to use QProcess to open Safari on Mac
General and Desktop
3
Posts
3
Posters
3.6k
Views
1
Watching
-
wrote on 7 Jul 2011, 00:15 last edited by
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?
-
wrote on 7 Jul 2011, 06:14 last edited by
i don't know about mac but if you just want to open an url, you can use QDesktopServices::openUrl(QUrl).
-
wrote on 7 Jul 2011, 08:30 last edited by
Try with /Applications/Safari.app/Contents/MacOS/Safari
3/3