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