12#if QT_CONFIG(accessibility)
16#include "private/qabstractbutton_p.h"
123 q->setCheckable(
true);
124 q->setMouseTracking(
true);
145 if (
d->tristate &&
d->noChange)
211 if (
d->tristate &&
d->noChange)
226#if QT_CONFIG(accessibility)
227 bool noChange =
d->noChange;
235 d->blockRefresh =
true;
237 d->blockRefresh =
false;
239 if (
state !=
d->publishedState) {
240 d->publishedState =
state;
242#if QT_DEPRECATED_SINCE(6, 9)
249#if QT_CONFIG(accessibility)
250 if (noChange !=
d->noChange) {
252 s.checkStateMixed =
true;
253 QAccessibleStateChangeEvent
event(
this,
s);
254 QAccessible::updateAccessibility(&
event);
266 if (
d->sizeHint.isValid())
311 if (hit !=
d->hovering) {
339 if (
state !=
d->publishedState) {
340 d->publishedState =
state;
342#if QT_DEPRECATED_SINCE(6, 9)
383#include "moc_qcheckbox.cpp"
Qt::CheckState publishedState
The QCheckBox widget provides a checkbox with a text label.
void checkStateChanged(Qt::CheckState)
void setTristate(bool y=true)
QSize minimumSizeHint() const override
\reimp
QSize sizeHint() const override
\reimp
QCheckBox(QWidget *parent=nullptr)
Constructs a checkbox with the given parent, but with no text.
void setCheckState(Qt::CheckState state)
Sets the checkbox's check state to state.
void mouseMoveEvent(QMouseEvent *) override
\reimp
virtual void initStyleOption(QStyleOptionButton *option) const
Initializes option with the values from this QCheckBox.
void checkStateSet() override
\reimp
Qt::CheckState checkState() const
Returns the checkbox's check state.
void paintEvent(QPaintEvent *) override
\reimp
void nextCheckState() override
\reimp
bool hitButton(const QPoint &pos) const override
\reimp
bool event(QEvent *e) override
\reimp
Type type() const
Returns the event type.
\reentrant \inmodule QtGui
bool isNull() const
Returns true if the icon is empty; otherwise returns false.
The QPaintEvent class contains event parameters for paint events.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QPointF position() const
Returns the position of the point in this event, relative to the widget or item that received the eve...
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const =0
Returns the size of the element described by the specified option and type, based on the provided con...
virtual QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const
Returns the area within the given rectangle in which to draw the provided text according to the speci...
virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const =0
Returns the sub-area for the given element as described in the provided style option.
Combined button and popup list for selecting options.
#define QT_IGNORE_DEPRECATIONS(statement)
constexpr const T & qMax(const T &a, const T &b)
GLdouble GLdouble GLdouble GLdouble q