[PySide] PySide application crashes when getting closed, related to QAction menu item
Manuel Koch
mko0815 at gmail.com
Tue Feb 25 09:13:06 CET 2014
Hi Sean
I tried your suggestion ( uses member variables to keep refs to
menubar/menu/actions ) but it still crashes.
I noticed something else that triggers the crash :
My main window uses a menu action to enable WhatsThis mode.
self._helpMenu = self._menubar.addMenu("&Help")
Commeting out the following line avoids the crash too :
self._helpMenu.addAction("&Whats
this...",QWhatsThis.enterWhatsThisMode)
Instead the following seems to work ( using my own receiver method ) :
self._helpMenu.addAction("&Whats this...",self._onWhatsThis)
And a new method for the main window
def _onWhatsThis(self):
QWhatsThis.enterWhatsThisMode()
kind regards
Manuel
2014-02-24 21:00 GMT+01:00 Sean Fisk <sean at seanfisk.com>:
> Hi Manuel,
>
> I would guess that it is a C++ scoping issue. I have had similar issues in
> the past and it is usually due to a C++ object that needs to stick around
> being dropped out of scope and then garbage-collected by Python.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140225/9050fa36/attachment.html>
More information about the PySide
mailing list