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_widgets_qabstractbutton.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]
5QPushButton *button = new QPushButton(tr("Ro&ck && Roll"), this);
6//! [0]
7
8
9//! [1]
10button->setIcon(QIcon(":/images/print.png"));
11button->setShortcut(tr("Alt+F7"));
12//! [1]
13
14
15//! [2]
16void MyWidget::reactToToggle(bool checked)
17{
18 if (checked) {
19 // Examine the new button states.
20 ...
21 }
22}
23//! [2]
QPushButton * button
[0]