Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qradiobutton.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 QRADIOBUTTON_H
5#define QRADIOBUTTON_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qabstractbutton.h>
9
10QT_REQUIRE_CONFIG(radiobutton);
11
13
14
17
18class Q_WIDGETS_EXPORT QRadioButton : public QAbstractButton
19{
21
22public:
23 explicit QRadioButton(QWidget *parent = nullptr);
24 explicit QRadioButton(const QString &text, QWidget *parent = nullptr);
26
27 QSize sizeHint() const override;
28 QSize minimumSizeHint() const override;
29
30protected:
31 bool event(QEvent *e) override;
32 bool hitButton(const QPoint &) const override;
33 void paintEvent(QPaintEvent *) override;
34 void mouseMoveEvent(QMouseEvent *) override;
35 virtual void initStyleOption(QStyleOptionButton *button) const;
36
37
38private:
39 Q_DECLARE_PRIVATE(QRadioButton)
40 Q_DISABLE_COPY(QRadioButton)
41 friend class QAccessibleButton;
42};
43
45
46#endif // QRADIOBUTTON_H
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
void mouseMoveEvent(QMouseEvent *e) override
\reimp
void paintEvent(QPaintEvent *e) override=0
\reimp
virtual bool hitButton(const QPoint &pos) const
Returns true if pos is inside the clickable button rectangle; otherwise returns false.
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:195
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:485
\inmodule QtCore\reentrant
Definition qpoint.h:23
The QRadioButton widget provides a radio button with a text label.
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\variable QStyleOptionHeaderV2::textElideMode
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QSize minimumSizeHint
the recommended minimum size for the widget
Definition qwidget.h:149
QSize sizeHint
the recommended size for the widget
Definition qwidget.h:148
QString text
QPushButton * button
[2]
double e
Combined button and popup list for selecting options.
struct _cl_event * event
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent