Hi Manuel, I tried your code on [Mac OS 10.9 Mavericks, PySide 1.2.1, Python 2.7.5] and it worked fine. Would you mind posting the error that you get?
Thanks, -- Sean Fisk On Mon, Feb 24, 2014 at 11:39 AM, Manuel Koch <[email protected]> wrote: > Hi > > I have a strange problem related to menu actions in my PySide application: > PySide 1.2.1, Python 2.7 32bit, Windows 7 > > My main window uses QAction to setup menu structure. > One of the menu items seems to cause a crash when the application is > closed. > Following small snippet seems to trigger app to crash immediately after > hitting the close button of main window !? > > I'm I doing something wrong when connecting signals/slots related to > QAction ? > > The code: > > class MainWindow(QMainWindow): > > def __init__(self,parent=None): > super(MainWindow,self).__init__(parent) > ..... > menubar = self.menuBar() > fooMenu = menubar.addMenu("&Foo") > # commenting out the following two lines avoids my app to crash > self._barAct = QAction("Bar", self, checkable=True, statusTip="Do > bar", triggered=self._onBar) > fooMenu.addAction(self._barAct) > > def _onBar(self): > "Handle toggling of bar checkbox" > print "_onBar" > > > _______________________________________________ > PySide mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/pyside > >
_______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
