Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_gui_kernel_qaction.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
//! [0]
5
QApplication
app
(
argc
,
argv
);
6
app.setAttribute(Qt::AA_DontShowIconsInMenus);
// Icons are *no longer shown* in menus
7
// ...
8
QAction
*
myAction
=
new
QAction();
9
// ...
10
myAction->setIcon(SomeIcon);
11
myAction->setIconVisibleInMenu(
true
);
// Icon *will* be shown in menus for *this* action.
12
//! [0]
myAction
QAction * myAction
Definition
src_gui_kernel_qaction.cpp:8
app
QApplication app(argc, argv)
[0]
qtbase
src
gui
doc
snippets
code
src_gui_kernel_qaction.cpp
Generated on Mon Mar 10 2025 00:41:00 for Qt by
1.13.2