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_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
4//! [0]
5g->setTitle("&User information");
6//! [0]
7
8//! [Set up QGroupBox with layout]
9QGroupBox *groupBox = new QGroupBox(tr("Group Box with Layout"));
10
11QRadioButton *radio1 = new QRadioButton(tr("&Radio button 1"));
12QRadioButton *radio2 = new QRadioButton(tr("R&adio button 2"));
13QRadioButton *radio3 = new QRadioButton(tr("Ra&dio button 3"));
14
15radio1->setChecked(true);
16
17QVBoxLayout *vbox = new QVBoxLayout;
18vbox->addWidget(radio1);
19vbox->addWidget(radio2);
20vbox->addWidget(radio3);
21vbox->addStretch(1);
22groupBox->setLayout(vbox);
23//! [Set up QGroupBox with layout]
QRadioButton * radio1
QRadioButton * radio2
QVBoxLayout * vbox
QRadioButton * radio3