summaryrefslogtreecommitdiff
path: root/examples/qml/tutorials/extending-qml/chapter6-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter6-plugins')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt1
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.h4
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.h6
3 files changed, 6 insertions, 5 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt
index fc9982bdb5..0b21891905 100644
--- a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt
@@ -5,6 +5,7 @@ qt6_add_qml_module(chartsplugin
VERSION 1.0
URI "Charts"
PLUGIN_TARGET chartsplugin
+ DEPENDENCIES QtQuick
)
target_sources(chartsplugin PRIVATE
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.h b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.h
index 2c50be16cf..6c771e9814 100644
--- a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.h
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.h
@@ -10,8 +10,8 @@ class PieSlice;
class PieChart : public QQuickItem
{
Q_OBJECT
- Q_PROPERTY(QQmlListProperty<PieSlice> slices READ slices)
- Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QQmlListProperty<PieSlice> slices READ slices FINAL)
+ Q_PROPERTY(QString name READ name WRITE setName FINAL)
QML_ELEMENT
public:
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.h b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.h
index a8987f00fc..b07773c29f 100644
--- a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.h
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.h
@@ -9,9 +9,9 @@
class PieSlice : public QQuickPaintedItem
{
Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(int fromAngle READ fromAngle WRITE setFromAngle)
- Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ Q_PROPERTY(int fromAngle READ fromAngle WRITE setFromAngle FINAL)
+ Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan FINAL)
QML_ELEMENT
public: