Important: Please read the Qt Code of Conduct -

How to use QProcess to open Safari on Mac

  • On Mac OS X, I try to use the code like this: QProcess::startDetached("/Applications/") 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?

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

  • Try with /Applications/

Log in to reply