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
qquickstyleitemradiodelegate.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 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
5
6#include <QtQuickTemplates2/private/qquickradiodelegate_p.h>
7
9
17
19{
20 initStyleOptionBase(styleOption);
21 auto radioDelegate = control<QQuickRadioDelegate>();
22
23 styleOption.state |= radioDelegate->isDown() ? QStyle::State_Sunken : QStyle::State_Raised;
24 styleOption.state |= radioDelegate->isChecked() ? QStyle::State_On : QStyle::State_Off;
25}
26
28
29#include "moc_qquickstyleitemradiodelegate.cpp"
void initStyleOption(QStyleOptionButton &styleOption) const override
virtual void connectToControl() const
void initStyleOptionBase(QStyleOption &styleOption) const
@ State_Sunken
Definition qstyle.h:69
@ State_Off
Definition qstyle.h:70
@ State_On
Definition qstyle.h:72
@ State_Raised
Definition qstyle.h:68
Combined button and popup list for selecting options.
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)