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
qgroupbox.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGROUPBOX_H
5#define QGROUPBOX_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qframe.h>
9
11
13
16class Q_WIDGETS_EXPORT QGroupBox : public QWidget
17{
19
22 Q_PROPERTY(bool flat READ isFlat WRITE setFlat)
23 Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
24 Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
25public:
26 explicit QGroupBox(QWidget *parent = nullptr);
27 explicit QGroupBox(const QString &title, QWidget *parent = nullptr);
28 ~QGroupBox();
29
30 QString title() const;
31 void setTitle(const QString &title);
32
33 Qt::Alignment alignment() const;
34 void setAlignment(int alignment);
35
36 QSize minimumSizeHint() const override;
37
38 bool isFlat() const;
39 void setFlat(bool flat);
40 bool isCheckable() const;
41 void setCheckable(bool checkable);
42 bool isChecked() const;
43
44public Q_SLOTS:
45 void setChecked(bool checked);
46
48 void clicked(bool checked = false);
49 void toggled(bool);
50
51protected:
52 bool event(QEvent *event) override;
53 void childEvent(QChildEvent *event) override;
54 void resizeEvent(QResizeEvent *event) override;
55 void paintEvent(QPaintEvent *event) override;
56 void focusInEvent(QFocusEvent *event) override;
57 void changeEvent(QEvent *event) override;
58 void mousePressEvent(QMouseEvent *event) override;
59 void mouseMoveEvent(QMouseEvent *event) override;
60 void mouseReleaseEvent(QMouseEvent *event) override;
61 virtual void initStyleOption(QStyleOptionGroupBox *option) const;
62
63
65 Q_DISABLE_COPY(QGroupBox)
66 Q_DECLARE_PRIVATE(QGroupBox)
67 Q_PRIVATE_SLOT(d_func(), void _q_setChildrenEnabled(bool b))
68};
69
71
72#endif // QGROUPBOX_H
\inmodule QtCore
Definition qcoreevent.h:379
\inmodule QtCore
Definition qcoreevent.h:45
The QFocusEvent class contains event parameters for widget focus events.
Definition qevent.h:470
The QGroupBox widget provides a group box frame with a title.
Definition qgroupbox.h:17
\inmodule QtGui
Definition qevent.h:196
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\variable QStyleOptionFrame::features
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
uint alignment
Combined button and popup list for selecting options.
Definition qcompare.h:63
GLboolean GLboolean GLboolean b
struct _cl_event * event
GLuint GLenum option
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
#define explicit
label setAlignment(Qt::AlignLeft|Qt::AlignTop)
[0]
QString title
[35]
radio1 setChecked(true)
g setTitle("&User information")
[0]