[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] action group triggered signals
From: Scott Frankel <frankel () circlesfx ! com>
Date: 2011-01-26 20:35:57
Message-ID: EDD61D3B-4290-4F46-A3E8-EB17B4A75A90 () circlesfx ! com
[Download RAW message or body]
Phil,
On Jan 26, 2011, at 11:48 AM, Phil Thompson wrote:
> On Wed, 26 Jan 2011 11:24:28 -0800, Scott Frankel <frankel@circlesfx.com
> >
> wrote:
>> Hi all,
>>
>> What's the best way to connect an action group triggered signal? The
>> following isn't working:
>>
>> self.connect(self.theActGroup, QtCore.SIGNAL("triggered(action)"),
>> self.foo)
>>
>>
>>
>> I'm adding a QToolButton with mutually exclusive actions to a
>> QToolBar. I must be missing something obvious, since the method I
>> connect to the triggered signal is not executing. eg:
>>
>> self.theButton = QtGui.QToolButton()
>> self.theButton.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
>> self.theActGroup = QtGui.QActionGroup(self.theButton)
>> self.theActGroup.setExclusive(True)
>> # actions added here...
>>
>> self.connect(self.theActGroup, QtCore.SIGNAL("triggered(action)"),
>> self.foo)
>> # self.foo() not executed
>>
>> See attached file for simple, working example.
>>
>> Thanks!
>> Scott
>
> The signal signature is "triggered(QAction *)".
>
> If you used new-style connections you wouldn't have to worry about
> this.
Understood. Thanks for the info,
Scott
>
> Phil
>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic