Results 1 to 5 of 5

Thread: Get Application Directory on MacOS return path with appName.app/Contents/MacOS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Get Application Directory on MacOS return path with appName.app/Contents/MacOS

    Quote Originally Posted by AsfK View Post
    Thank you Cheers
    I didn't know about this (I came from Windows 'world'..)
    Even true on Windows
    Well, on anything newer than Windows 98 and when not running with Administrator rights.

    Quote Originally Posted by AsfK View Post
    btw, do you know If I can do If Def in my code (If the app. run on Mac save where I can, else in the executable folder...)
    You can do that, e.g. when building using Q_OS_MAC, Q_OS_WINDOWS, etc. but I wouldn't recommend it until you really have to. Makes it a lot harder to maintain.

    Quote Originally Posted by AsfK View Post
    or if can I ask permissions ?
    Not sure what you mean by that?
    Checking if you can write a file? QFileInfo::isWritable()
    Ask the user for elevated rights? No cross-desktop way to do that and likely very unnecessary.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    AsfK (6th March 2014)

  3. #2
    Join Date
    Aug 2013
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Get Application Directory on MacOS return path with appName.app/Contents/MacOS

    Thank you very much !!!

Similar Threads

  1. QVideoWidget on macos blocks application, need help.
    By DavidXanatos in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2016, 19:19
  2. Embedding MacOS application in QtWidget
    By brainTech in forum Newbie
    Replies: 0
    Last Post: 3rd January 2013, 05:46
  3. Qt4 + C++ + MacOs + Path
    By zeeb100 in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2009, 09:23
  4. Application.app/Contents/MacOS file issue
    By sgmurphy19 in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2008, 09:03
  5. Replies: 8
    Last Post: 5th August 2008, 12:09

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
  •  
Qt is a trademark of The Qt Company.