[Pythonmac-SIG] QSettings not working with py2app build

tangle1 at mindspring.com tangle1 at mindspring.com
Wed Jul 8 02:06:52 CEST 2009


Hello,

I developed a Python2.51/PyQt4 script on Mac which saves data using QSettings. I use py2app to build stand-alone app that I can distribute to other macs without PyQt,Qt.

- All is good when running from terminal shell and I verified QSettings saved to file: /Users/dev/Library/Preferences/com.imagemoversdigital.win2mac.plist
- I build app using py2app and two bads: i) upon closing app, error window pops up (see attached) ii) no new data is saved to QSettings file.

I use QSettings.fileName() method to get file path and display in status field. Even when running in app mode, script returns correct file path. I use callback from SIGNAL("aboutToQuit") to write out QSettings data upon closing. No difference when I used closeEvent(). The crash-on-close behavior goes away if I do not save QSettings data on close

Thanks in advance!!

Suzanne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win2mac_exerr.png
Type: image/png
Size: 28092 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090707/bb64508b/attachment-0001.png>


More information about the Pythonmac-SIG mailing list