[PyQt] Re: Adding multiple actions
Alberto Berti
alberto at metapensiero.it
Thu Jun 12 11:06:04 BST 2008
>>>>> "David" == David Klasinc <bigwhale at lubica.net> writes:
David> Greetings, I have more Qt oriented question about adding
David> actions. If I add several actions to a toolbar, how do I
David> refer to them later?
you can prepare actions before adding them to the tolbar, But you can
always access them later using QWidget.actions()
David> How to connect those action's signals to a certain slot?
as with any other widget
David> I'm trying to add few buttons to a toolbar during runtime
David> and I'd like all of them to be connected to the same
David> slot. But I have no way of knowing which one was
David> triggered. Any solutions to this?
QSignalMapper:
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qsignalmapper.html
cheers
Alberto
More information about the PyQt
mailing list