[PyQt] Re: Problems with closeEvent
Gustavo A. Díaz
gustavo.diaz at gmail.com
Mon May 26 20:15:27 BST 2008
Argggggg!
never mind.. solved... i was using self.settings = QSettings() bla bla bla,
inside the closeEvent, and i've tried without self... and now it writes the
file on close.... so i still use sys.exit() :D
Sorry...
Cheers.
2008/5/26 Gustavo A. Díaz <gustavo.diaz at gmail.com>:
> Hi guys,
>
> I am having some problems with closeEvent having
> setQuitOnLastWindowClosed(False) on main().
> When i connect to close() (from my systray) it only hides my application.
> For that, a temporal fix for me was inserting on the closeEvent: sys.exit()
> but, now that i am implementing QSettings to store the windows position, is
> a problem... since that does not work if i use sys.exit() method.
>
> Now, why i use setQuitOnLastWindowClosed(False)? cause i want to prevent
> User to close the app. pressing alt+f4. I've tried to use a keys events and
> ignoring those keys combination, but didnt worked.
>
> So, how can i close my application then?
>
> Cheers.
>
> --
> Gustavo A. Díaz
> GDNet Projects
> www.gdnet.com.ar
--
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080526/065132cf/attachment.html
More information about the PyQt
mailing list