Results 1 to 3 of 3

Thread: how to get root privilege for QProcess to run installer on Mac

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: how to get root privilege for QProcess to run installer on Mac

    (...) just like double-clicked a mpkg
    I've never tried that on mac, but maybe this will work:
    Qt Code:
    1. QDesktopServices::openUrl(QUrl::fromLocalFile("MY_APP.mpkg"));
    To copy to clipboard, switch view to plain text mode 
    quote from QDesktopServices docs:
    If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.

  2. #2
    Join Date
    Apr 2015
    Location
    Beijing,China
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to get root privilege for QProcess to run installer on Mac

    Quote Originally Posted by stampede View Post
    I've never tried that on mac, but maybe this will work:
    Qt Code:
    1. QDesktopServices::openUrl(QUrl::fromLocalFile("MY_APP.mpkg"));
    To copy to clipboard, switch view to plain text mode 
    quote from QDesktopServices docs:
    It works and it's exactly what I want.Thank you!

Similar Threads

  1. Replies: 5
    Last Post: 30th January 2014, 09:03
  2. Replies: 1
    Last Post: 3rd June 2013, 13:11
  3. root privilege libpcap Elevation Problem mac os x
    By abiusx in forum Qt Programming
    Replies: 0
    Last Post: 24th January 2011, 12:52
  4. Installer UI
    By addu in forum Qt Programming
    Replies: 1
    Last Post: 25th August 2009, 11:53
  5. installer
    By koyot in forum Newbie
    Replies: 1
    Last Post: 26th February 2007, 13:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.