[PyQt] Adding multiple actions

David Klasinc bigwhale at lubica.net
Thu Jun 12 10:51:30 BST 2008


Greetings,

I have more Qt oriented question about adding actions. If I add several 
actions to a toolbar, how do I refer to them later?

myToolBar.addAction ("Button 1")
myToolBar.addAction ("Button 2")
myToolBar.addAction ("Button 3")
myToolBar.addAction ("Button 4")


How to connect those action's signals to a certain slot?

I'm trying to add few buttons to a toolbar during runtime and I'd like 
all of them to be connected to the same slot. But I have no way of 
knowing which one was triggered. Any solutions to this?

regards,
David


More information about the PyQt mailing list