Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_gui_widgets_qgroupbox.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
5
g
->setTitle(
"&User information"
);
7
9
QGroupBox
*
groupBox
=
new
QGroupBox
(
tr
(
"Group Box with Layout"
));
10
11
QRadioButton
*
radio1
=
new
QRadioButton
(
tr
(
"&Radio button 1"
));
12
QRadioButton
*
radio2
=
new
QRadioButton
(
tr
(
"R&adio button 2"
));
13
QRadioButton
*
radio3
=
new
QRadioButton
(
tr
(
"Ra&dio button 3"
));
14
15
radio1
->
setChecked
(
true
);
16
17
QVBoxLayout
*
vbox
=
new
QVBoxLayout
;
18
vbox
->
addWidget
(
radio1
);
19
vbox
->
addWidget
(
radio2
);
20
vbox
->
addWidget
(
radio3
);
21
vbox
->
addStretch
(1);
22
groupBox
->
setLayout
(
vbox
);
QAbstractButton::setChecked
void setChecked(bool)
Definition
qabstractbutton.cpp:584
QBoxLayout::addWidget
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment.
Definition
qboxlayout.cpp:1008
QBoxLayout::addStretch
void addStretch(int stretch=0)
Adds a stretchable space (a QSpacerItem) with zero minimum size and stretch factor stretch to the end...
Definition
qboxlayout.cpp:971
QGroupBox
The QGroupBox widget provides a group box frame with a title.
Definition
qgroupbox.h:17
QRadioButton
The QRadioButton widget provides a radio button with a text label.
Definition
qradiobutton.h:19
QVBoxLayout
The QVBoxLayout class lines up widgets vertically.
Definition
qboxlayout.h:91
QWidget::setLayout
void setLayout(QLayout *)
Sets the layout manager for this widget to layout.
Definition
qwidget.cpp:10240
g
GLboolean GLboolean g
Definition
qopengles2ext.h:337
tr
#define tr(X)
Definition
qtemporaryfile.cpp:21
radio1
QRadioButton * radio1
Definition
src_gui_widgets_qgroupbox.cpp:11
radio2
QRadioButton * radio2
Definition
src_gui_widgets_qgroupbox.cpp:12
groupBox
QGroupBox * groupBox
[0]
Definition
src_gui_widgets_qgroupbox.cpp:9
vbox
QVBoxLayout * vbox
Definition
src_gui_widgets_qgroupbox.cpp:17
radio3
QRadioButton * radio3
Definition
src_gui_widgets_qgroupbox.cpp:13
qtbase
src
widgets
doc
snippets
code
src_gui_widgets_qgroupbox.cpp
Generated by
1.10.0