Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How can i get QAction from QMenu throught index
-
Hellow, how can i get QAction from QMenu throught index, dont QPoint
Advance, many thanks fot your help
-
@QMenu *menu;
//...
menu->actions().at(index);
@
-
Hi, Ruzik.
Try "this":http://doc.qt.nokia.com/4.7/qwidget.html#actions
@QList<QAction*> actionList = yourMenu->actions()
if (!actionList.empty()) {
QAction *action = actionList.at(index);
//bla bla
}
@
Update: Franzk is faster :-)