[PyQt] default action names
Scott Frankel
frankel at circlesfx.com
Thu Oct 22 21:10:08 BST 2009
On Oct 22, 2009, at 10:57 AM, Baz Walter wrote:
> Scott Frankel wrote:
>> 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.
>
> it would help if you posted a complete example that demonstrates the
> problem. the above code snippet doesn't show the action being added
> to anything. are you trying add actions to a menu in the menubar, or
> are you trying to create a context menu?
>
>
I'm using addAction to add the action to the app's main menu.
See simple, running code sample attached. Note line 59. The action's
first arg is misspelled "Setttings." Using the correct spelling, the
action silently fails to be added to the menu.
Thanks
Scott
-------------- next part --------------
Skipped content of type multipart/mixed
More information about the PyQt
mailing list