Use QMenu::actionAt() or QWidget::actions().
Okay, thank you so far.
Now i get all actions and the submenu-objects correctly.
One questions remains
How can I call a specific QAction? At the moment I'm iterating the QList<QAction *> to get the ations.. If there are more than one I have to select one (which is obviously possible by comparing the text of these actions). But how can I choose one without iterating?
If your action is the fifth added to the widget, you can call:
etc.
duck182 (26th January 2011)
Oh okay, but not via the text-property or sth equal?
You can iterate over available actions and check their text if you want.
Bookmarks