2

I'm porting some Qt apps to Mac OS. And have some questions because I have no experience in developing apps for Mac OS.

  • Where Applications usually save there settings in Mac OS?
  • How to handle file dropping on icon in dock?
lulyon
  • 6,707
  • 7
  • 32
  • 49
Ruslan F.
  • 5,498
  • 3
  • 23
  • 42

1 Answers1

2

Mac OS X applications typically save their settings in ~/Library/Preferences/ using an XML document called a Property List. If you use the QCoreApplication::setOrganization(..) et all methods, just use QSettings and your code will remain cross platform and do the right thing.

Handling file dropping on the application icon is a little more involved but there is already a pretty good answer and also a Qt Quarterly dealing with this problem. It will basically involve:

  1. Setting up the Info.plist in the application bundle to identify what files types are handled by your application.
  2. Subclassing QApplication to handle QEvent::FileOpen.
Community
  • 1
  • 1
Linville
  • 3,613
  • 1
  • 27
  • 41