PDA

View Full Version : PyQt4, QSettings on Mac using py2app



skoshi
8th July 2009, 01:50
I wrote a Python/PyQt4 script for Mac (OSX 10.5). It uses QSettings to save data preferences. It works correctly when I run from terminal shell window (>python win2mac.py)

I use py2app to create a standalone distributable application. When I run script as an app (double-clicking), there are 2 issues:
1) when closing app, a Mac error window pops up ... "The application win2mac quit unexpectedly"

2) New data is not saved via QSettings object.

I use callback from SIGNAL("aboutToQuit") to write out QSettings data upon closing. No difference when I used closeEvent().

Again ... it all works when running from terminal shell .. but it doesn't when running as an app