aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt1
-rw-r--r--examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/piechart.h4
-rw-r--r--examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt
index 50e231bb7d..51855394e3 100644
--- a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt
+++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt
@@ -41,6 +41,7 @@ qt_add_qml_module(chapter4-customPropertyTypes
VERSION 1.0
QML_FILES app.qml
NO_RESOURCE_TARGET_PATH
+ DEPENDENCIES QtQuick
)
install(TARGETS chapter4-customPropertyTypes
diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/piechart.h b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/piechart.h
index 855ad7ae3a..57ef7d90e2 100644
--- a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/piechart.h
+++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/piechart.h
@@ -58,9 +58,9 @@ class PieSlice;
class PieChart : public QQuickItem
{
Q_OBJECT
- Q_PROPERTY(PieSlice* pieSlice READ pieSlice WRITE setPieSlice)
+ Q_PROPERTY(PieSlice* pieSlice READ pieSlice WRITE setPieSlice FINAL)
//![0]
- Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QString name READ name WRITE setName FINAL)
Q_MOC_INCLUDE("pieslice.h")
QML_ELEMENT
//![1]
diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h
index 6e64917851..84d1789e56 100644
--- a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h
+++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h
@@ -57,7 +57,7 @@
class PieSlice : public QQuickPaintedItem
{
Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
QML_ELEMENT
public: