From 405bd4299819e39397cea0090a9442fd4b6ce911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= Date: Fri, 17 Mar 2023 15:42:47 +0100 Subject: Doc: Revamp "Extending QML" examples into a tutorial The examples in the "Extending QML" series were often redundant with the information of the "Writing QML Extensions with C++" tutorial, had outdated code and sometimes had no documentation. The examples that covered topics not mentioned in the first tutorial were revamped into a second "advanced" tutorial extending the first one. The others were removed. The remaining examples were largely based on the same example code of a birthday party. This code was slightly adapted and separated into 7 states, each building upon the previous, with the code change illustrating the associated feature. A tutorial page, in the style of the first one, was added documenting the different QML features and the required code changes in the example project. Links in the documentation from and to the affected pages were update as best as possible. Pick-to: 6.5 Fixes: QTBUG-111033 Change-Id: I9d97e8b32b128c1624d67525996fa14d493909d3 Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale Reviewed-by: Ulf Hermann --- .../advanced5-Attached-properties/Main.qml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/qml/tutorials/extending-qml-advanced/advanced5-Attached-properties/Main.qml (limited to 'examples/qml/tutorials/extending-qml-advanced/advanced5-Attached-properties/Main.qml') diff --git a/examples/qml/tutorials/extending-qml-advanced/advanced5-Attached-properties/Main.qml b/examples/qml/tutorials/extending-qml-advanced/advanced5-Attached-properties/Main.qml new file mode 100644 index 0000000000..8175eae209 --- /dev/null +++ b/examples/qml/tutorials/extending-qml-advanced/advanced5-Attached-properties/Main.qml @@ -0,0 +1,23 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import People +import QtQuick // For QColor + +BirthdayParty { + Boy { + name: "Robert Campbell" + BirthdayParty.rsvp: Date.fromLocaleString(Qt.locale(), "2023-03-01", "yyyy-MM-dd") + } + + Boy { + name: "Leo Hodges" + shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 } + BirthdayParty.rsvp: Date.fromLocaleString(Qt.locale(), "2023-03-03", "yyyy-MM-dd") + } + + host: Boy { + name: "Jack Smith" + shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 } + } +} -- cgit v1.2.1