blob: 7594ee33eb49e75ba8be7d790a348bf68740c603 (
plain)
1
2
3
4
5
6
7
8
9
|
//! [0]
app = QApplication(argv)
app.setAttribute(Qt.AA_DontShowIconsInMenus) # Icons are *no longer shown* in menus
// ...
myAction = QAction()
// ...
myAction.setIcon(SomeIcon)
myAction.setIconVisibleInMenu(True) # Icon *will* be shown in menus for *this* action.
//! [0]
|