[PyQt] default action names

Scott Frankel frankel at circlesfx.com
Thu Oct 22 18:32:32 BST 2009


Hi,

Does a QMainWindow, or an app based on, one contain a list of default  
action names?

I'm trying to add an action called "Settings" to my app.  The  
addAction() method silently fails unless I rename or misspell the  
action, like "Foo" or "Setttings."

Actions named "Settings", "Preferences", "Configuration" all silently  
fail.

Trying to find what names may already be claimed, my invocations of  
the actions() method always return an empty list.

Thanks
Scott


		self.settingsEditAct    = QtGui.QAction(self.tr("Foo..."), self)
		self.settingsEditAct.setStatusTip(self.tr("Settings Form..."))
		self.connect(self.settingsEditAct, QtCore.SIGNAL("triggered()"),  
self.settingsEdit)
		
		print "actions: ", self.actions()



More information about the PyQt mailing list