aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-06-25 13:34:30 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-06-26 13:08:23 +0000
commitbf727efa7aa9a4738ae86a2c699832129813c670 (patch)
tree970d8ffdd4b4a1c61d348fdb217259542f18d411
parentf31da34faf08d18f83bd36cfcf5c44dc7019f529 (diff)
Native style: add Dialwip/nativestyle
Change-Id: Iad09b9f6080994528d65dcddc9eda49dbba356f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--examples/quickcontrols2/desktopgallery/CustomDials.qml87
-rw-r--r--examples/quickcontrols2/desktopgallery/Dials.qml66
-rw-r--r--examples/quickcontrols2/desktopgallery/desktopgallery.pro2
-rw-r--r--examples/quickcontrols2/desktopgallery/main.qml2
-rw-r--r--src/imports/controls/macos/Dial.qml43
-rw-r--r--src/imports/controls/macos/macos.pri1
-rw-r--r--src/imports/nativestyle/controls/DefaultDial.qml59
-rw-r--r--src/imports/nativestyle/controls/controls.pri1
-rw-r--r--src/imports/nativestyle/items/items.pri2
-rw-r--r--src/imports/nativestyle/items/qquickstyleitemdial.cpp110
-rw-r--r--src/imports/nativestyle/items/qquickstyleitemdial.h60
-rw-r--r--src/imports/nativestyle/qmldir1
-rw-r--r--src/imports/nativestyle/qstyle/qquickcommonstyle.cpp2
-rw-r--r--src/imports/nativestyle/qstyle/qquickstyle.h1
14 files changed, 437 insertions, 0 deletions
diff --git a/examples/quickcontrols2/desktopgallery/CustomDials.qml b/examples/quickcontrols2/desktopgallery/CustomDials.qml
new file mode 100644
index 00000000..c1a0ac4e
--- /dev/null
+++ b/examples/quickcontrols2/desktopgallery/CustomDials.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick dial1s 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.12
+import QtQuick.Layouts 2.15
+
+ControlContainer {
+ id: container
+ title: "Dials"
+
+ Row {
+ spacing: container.rowSpacing
+
+ Dial {
+ id: dial1
+ width: 50
+ height: 50
+ from: 0
+ to: 10
+ value: 5
+
+ background: DialImpl {
+ implicitWidth: 184
+ implicitHeight: 184
+ color: "darkgray"
+ progress: dial1.position
+ opacity: dial1.enabled ? 1 : 0.3
+ }
+
+ handle: ColorImage {
+ x: dial1.background.x + dial1.background.width / 2 - width / 2
+ y: dial1.background.y + dial1.background.height / 2 - height / 2
+ width: 14
+ height: 10
+ color: "green"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/dial-indicator.png"
+ antialiasing: true
+ opacity: dial1.enabled ? 1 : 0.3
+ transform: [
+ Translate {
+ y: -Math.min(dial1.background.width, dial1.background.height) * 0.4 + dial1.handle.height / 2
+ },
+ Rotation {
+ angle: dial1.angle
+ origin.x: dial1.handle.width / 2
+ origin.y: dial1.handle.height / 2
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/examples/quickcontrols2/desktopgallery/Dials.qml b/examples/quickcontrols2/desktopgallery/Dials.qml
new file mode 100644
index 00000000..56dff2a4
--- /dev/null
+++ b/examples/quickcontrols2/desktopgallery/Dials.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 2.15
+
+ControlContainer {
+ id: container
+ title: "Dials"
+
+ Row {
+ spacing: container.rowSpacing
+
+ Dial {
+ width: 50
+ height: 50
+ from: 0
+ to: 10
+ value: 5
+ }
+
+ Dial {
+ width: 50
+ height: 50
+ from: 0
+ to: 10
+ value: 5
+ stepSize: 1
+ property int qqc2_style_tickPosition: 1
+ }
+ }
+}
diff --git a/examples/quickcontrols2/desktopgallery/desktopgallery.pro b/examples/quickcontrols2/desktopgallery/desktopgallery.pro
index cabc9d7c..6c6112db 100644
--- a/examples/quickcontrols2/desktopgallery/desktopgallery.pro
+++ b/examples/quickcontrols2/desktopgallery/desktopgallery.pro
@@ -30,6 +30,8 @@ QML_FILES = \
CustomScrollBars.qml \
ProgressBars.qml \
CustomProgressBars.qml \
+ Dials.qml \
+ CustomDials.qml \
OTHER_FILES += $$QML_FILES
RESOURCES += $$QML_FILES
diff --git a/examples/quickcontrols2/desktopgallery/main.qml b/examples/quickcontrols2/desktopgallery/main.qml
index 5bdbd71f..6cf7a646 100644
--- a/examples/quickcontrols2/desktopgallery/main.qml
+++ b/examples/quickcontrols2/desktopgallery/main.qml
@@ -86,6 +86,7 @@ ApplicationWindow {
TextFields { }
TextAreas { }
ComboBoxes { }
+ Dials { }
Frames { }
ProgressBars { }
ScrollBars { }
@@ -112,6 +113,7 @@ ApplicationWindow {
CustomTextFields { }
CustomTextAreas { }
CustomComboBoxes { }
+ CustomDials { }
CustomFrames { }
CustomProgressBars { }
CustomScrollBars { }
diff --git a/src/imports/controls/macos/Dial.qml b/src/imports/controls/macos/Dial.qml
new file mode 100644
index 00000000..d21bfbed
--- /dev/null
+++ b/src/imports/controls/macos/Dial.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+import QtQuick.Controls.impl 2.12
+import QtQuick.NativeStyle 6.0 as NativeStyle
+
+NativeStyle.DefaultDial {
+}
diff --git a/src/imports/controls/macos/macos.pri b/src/imports/controls/macos/macos.pri
index aeafdcb3..98474a92 100644
--- a/src/imports/controls/macos/macos.pri
+++ b/src/imports/controls/macos/macos.pri
@@ -11,3 +11,4 @@ QML_FILES += \
$$PWD/ComboBox.qml \
$$PWD/ScrollBar.qml \
$$PWD/ProgressBar.qml \
+ $$PWD/Dial.qml \
diff --git a/src/imports/nativestyle/controls/DefaultDial.qml b/src/imports/nativestyle/controls/DefaultDial.qml
new file mode 100644
index 00000000..d4fc3b98
--- /dev/null
+++ b/src/imports/nativestyle/controls/DefaultDial.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+import QtQuick.Controls.impl 2.12
+import QtQuick.Templates 2.12 as T
+import QtQuick.NativeStyle 6.0 as NativeStyle
+
+T.Dial {
+ id: control
+
+ readonly property bool nativeBackground: background instanceof NativeStyle.StyleItem
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
+ font.pixelSize: nativeBackground ? background.styleFont(control).pixelSize : undefined
+
+ background: NativeStyle.Dial {
+ control: control
+ useNinePatchImage: false
+ }
+}
diff --git a/src/imports/nativestyle/controls/controls.pri b/src/imports/nativestyle/controls/controls.pri
index 55f84703..8675989e 100644
--- a/src/imports/nativestyle/controls/controls.pri
+++ b/src/imports/nativestyle/controls/controls.pri
@@ -11,3 +11,4 @@ QML_FILES += \
$$PWD/DefaultComboBox.qml \
$$PWD/DefaultScrollBar.qml \
$$PWD/DefaultProgressBar.qml \
+ $$PWD/DefaultDial.qml \
diff --git a/src/imports/nativestyle/items/items.pri b/src/imports/nativestyle/items/items.pri
index a5c33b86..f9caca1c 100644
--- a/src/imports/nativestyle/items/items.pri
+++ b/src/imports/nativestyle/items/items.pri
@@ -14,6 +14,7 @@ HEADERS += \
$$PWD/qquickstyleitemcombobox.h \
$$PWD/qquickstyleitemscrollbar.h \
$$PWD/qquickstyleitemprogressbar.h \
+ $$PWD/qquickstyleitemdial.h \
SOURCES += \
$$PWD/qquickstyleitem.cpp \
@@ -29,3 +30,4 @@ SOURCES += \
$$PWD/qquickstyleitemcombobox.cpp \
$$PWD/qquickstyleitemscrollbar.cpp \
$$PWD/qquickstyleitemprogressbar.cpp \
+ $$PWD/qquickstyleitemdial.cpp \
diff --git a/src/imports/nativestyle/items/qquickstyleitemdial.cpp b/src/imports/nativestyle/items/qquickstyleitemdial.cpp
new file mode 100644
index 00000000..f214fb2e
--- /dev/null
+++ b/src/imports/nativestyle/items/qquickstyleitemdial.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickstyleitemdial.h"
+
+QFont QQuickStyleItemDial::styleFont(QQuickItem *control)
+{
+ return style()->font(QStyle::CE_ProgressBarLabel, controlSize(control));
+}
+
+void QQuickStyleItemDial::connectToControl()
+{
+ QQuickStyleItem::connectToControl();
+ auto dial = control<QQuickDial>();
+ connect(dial, &QQuickDial::fromChanged, this, &QQuickStyleItem::markImageDirty);
+ connect(dial, &QQuickDial::toChanged, this, &QQuickStyleItem::markImageDirty);
+ connect(dial, &QQuickDial::positionChanged, this, &QQuickStyleItem::markImageDirty);
+ connect(dial, &QQuickDial::valueChanged, this, &QQuickStyleItem::markImageDirty);
+ connect(dial, &QQuickDial::stepSizeChanged, this, &QQuickStyleItem::markImageDirty);
+ connect(dial, &QQuickDial::pressedChanged, this, &QQuickStyleItem::markImageDirty);
+}
+
+StyleItemGeometry QQuickStyleItemDial::calculateGeometry()
+{
+ QStyleOptionSlider styleOption;
+ initStyleOption(styleOption);
+
+ StyleItemGeometry geometry;
+ geometry.minimumSize = style()->sizeFromContents(QStyle::CT_Dial, &styleOption, QSize(0, 0));
+ geometry.implicitSize = geometry.minimumSize;
+ geometry.layoutRect = style()->subElementRect(QStyle::SE_SliderLayoutItem, &styleOption);
+ geometry.ninePatchMargins = style()->ninePatchMargins(QStyle::CC_Dial, &styleOption, geometry.minimumSize);
+
+ return geometry;
+}
+
+void QQuickStyleItemDial::paintEvent(QPainter *painter)
+{
+ QStyleOptionSlider styleOption;
+ initStyleOption(styleOption);
+ style()->drawComplexControl(QStyle::CC_Dial, &styleOption, painter);
+}
+
+void QQuickStyleItemDial::initStyleOption(QStyleOptionSlider &styleOption)
+{
+ initStyleOptionBase(styleOption);
+ auto dial = control<QQuickDial>();
+
+ styleOption.subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle;
+ styleOption.activeSubControls = QStyle::SC_None;
+ styleOption.tickInterval = dial->stepSize();
+ styleOption.dialWrapping = dial->wrap();
+ styleOption.upsideDown = true;
+
+ if (dial->isPressed())
+ styleOption.state |= QStyle::State_Sunken;
+
+ if (dial->stepSize() == 0) {
+ styleOption.minimum = 0;
+ styleOption.maximum = 10000;
+ styleOption.sliderPosition = dial->position() * styleOption.maximum;
+ } else {
+ styleOption.minimum = dial->from();
+ styleOption.maximum = dial->to();
+ styleOption.sliderPosition = dial->value();
+ }
+
+ // TODO: add proper API for tickmarks
+ const int index = dial->metaObject()->indexOfProperty("qqc2_style_tickPosition");
+ if (index != -1) {
+ const int tickPosition = dial->metaObject()->property(index).read(dial).toInt();
+ styleOption.tickPosition = QStyleOptionSlider::TickPosition(tickPosition);
+ if (styleOption.tickPosition != QStyleOptionSlider::NoTicks)
+ styleOption.subControls |= QStyle::SC_DialTickmarks;
+ }
+
+}
diff --git a/src/imports/nativestyle/items/qquickstyleitemdial.h b/src/imports/nativestyle/items/qquickstyleitemdial.h
new file mode 100644
index 00000000..3eefa734
--- /dev/null
+++ b/src/imports/nativestyle/items/qquickstyleitemdial.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKSTYLEITEMDIAL_H
+#define QQUICKSTYLEITEMDIAL_H
+
+#include "qquickstyleitem.h"
+#include <QtQuickTemplates2/private/qquickdial_p.h>
+
+class QQuickStyleItemDial : public QQuickStyleItem
+{
+ Q_OBJECT
+ QML_NAMED_ELEMENT(Dial)
+
+public:
+ QFont styleFont(QQuickItem *control) override;
+
+protected:
+ void connectToControl() override;
+ void paintEvent(QPainter *painter) override;
+ StyleItemGeometry calculateGeometry() override;
+
+private:
+ void initStyleOption(QStyleOptionSlider &styleOption);
+};
+
+#endif // QQUICKSTYLEITEMDIAL_H
diff --git a/src/imports/nativestyle/qmldir b/src/imports/nativestyle/qmldir
index 799a9609..3b6ce6c5 100644
--- a/src/imports/nativestyle/qmldir
+++ b/src/imports/nativestyle/qmldir
@@ -15,3 +15,4 @@ DefaultTextArea 6.0 controls/DefaultTextArea.qml
DefaultComboBox 6.0 controls/DefaultComboBox.qml
DefaultScrollBar 6.0 controls/DefaultScrollBar.qml
DefaultProgressBar 6.0 controls/DefaultProgressBar.qml
+DefaultDial 6.0 controls/DefaultDial.qml
diff --git a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
index 16e05abd..41f12545 100644
--- a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
+++ b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
@@ -4666,6 +4666,8 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, c
if (const QStyleOptionSlider *option = qstyleoption_cast<const QStyleOptionSlider *>(opt))
sz = subControlRect(QStyle::CC_Slider, option, QStyle::SC_SliderHandle).size();
break;
+ case CT_Dial:
+ sz = QSize(20, 20);
case CT_Frame:
if (const QStyleOptionFrame *option = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
const int ninePatchSplit = 1;
diff --git a/src/imports/nativestyle/qstyle/qquickstyle.h b/src/imports/nativestyle/qstyle/qquickstyle.h
index 8fd3a5ae..4a2e5287 100644
--- a/src/imports/nativestyle/qstyle/qquickstyle.h
+++ b/src/imports/nativestyle/qstyle/qquickstyle.h
@@ -543,6 +543,7 @@ public:
CT_Menu,
CT_TabBarTab,
CT_Slider,
+ CT_Dial,
CT_ScrollBar,
CT_LineEdit,
CT_SpinBox,