8718

Qt 4.8.5 Mac Handle file dropping on dock icon

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

    <li>Where Applications usually save there settings in Mac OS?</li> <li>How to handle file dropping on icon in dock?</li> </ul>

    Answer1:

    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:

    <ol> <li>Setting up the Info.plist in the application bundle to identify what files types are handled by your application.</li> <li>Subclassing QApplication to handle QEvent::FileOpen.</li> </ol>

Recommend

  • How to create QtWebApp application
  • Deconstruct object gives QCoreApplication::sendEvent: \"Cannot send events to objects owned by
  • Update Scene from Thread?
  • iOS: how to respond to up/down/left/right arrow event from physical keyboard?
  • disable menu bar and dock programmatically in mac
  • Deleting in NSDocumentDirectory
  • How can I Display UserControl into a form
  • How to attach php documentation in eclipse
  • How do I get rid of the Eclipse Find/Replace Bar
  • Transparent images in PDF
  • Android libgdx prefs getting lost
  • Why does CollectionViewSource.GetDefaultView(…) return the wrong CurrentItem from inside a Task thre
  • why 0.1+0.2-0.3= 5.5511151231258E-17 in php [duplicate]
  • richtextbox to string
  • iOS - Is this a task for enums?
  • DataGridView: Pass by Value or Reference?
  • Deleting a widget from QTableView
  • Fat binaries in iOS
  • back button function for phonegap windows phone 7
  • Can long-polling be achieved in Restlet by just making the thread sleep?
  • Retaining data after updating application
  • Dynamically switching connect in Modelica
  • Validate child input components on submit with Vee-Validate and vue js 2
  • Can someone please explain to me in the most layman terms how to use EventArgs?
  • Alternative to overridePendingTransition() - Android
  • How to suppress a dialog
  • Xcode 4 NSLog Macro link in Xcode 3
  • debug library loaded with ctypes using gdb
  • Combining SpatialPolygonsDataFrame of two neighbour countries
  • Play WS (2.2.1): post/put large request
  • Control modification in presentation layer
  • javaw.exe and eclipse startup problems
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Deserializing XML into class C#
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • Why winpcap requires both .lib and .dll to run?
  • Is there a mandatory requirement to switch app.yaml?
  • Android Google Maps API OnLocationChanged only called once
  • reshape alternating columns in less time and using less memory
  • How to Embed XSL into XML