summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_gui_kernel_qaction.cpp
blob: b052febed3db3e33b25d7a8d81b111b86357aaa9 (plain)
1
2
3
4
5
6
7
8
9
//! [0]
QApplication app(argc, argv);
app.setAttribute(Qt::AA_DontShowIconsInMenus);  // Icons are *no longer shown* in menus
// ...
QAction *myAction = new QAction();
// ...
myAction->setIcon(SomeIcon);
myAction->setIconVisibleInMenu(true);   // Icon *will* be shown in menus for *this* action.
//! [0]