diff options
Diffstat (limited to 'examples/quickcontrols/chattutorial/chapter1')
-rw-r--r-- | examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt | 6 | ||||
-rw-r--r-- | examples/quickcontrols/chattutorial/chapter1/Main.qml (renamed from examples/quickcontrols/chattutorial/chapter1/main.qml) | 2 | ||||
-rw-r--r-- | examples/quickcontrols/chattutorial/chapter1/chapter1.pro | 7 | ||||
-rw-r--r-- | examples/quickcontrols/chattutorial/chapter1/main.cpp | 4 | ||||
-rw-r--r-- | examples/quickcontrols/chattutorial/chapter1/qmldir | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt index 80be9d275e..eee2bdf6e3 100644 --- a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt +++ b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2022 The Qt Company Ltd. +# Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16) @@ -27,9 +27,9 @@ target_link_libraries(chattutorial-chapter1 PRIVATE qt_policy(SET QTP0001 NEW) qt_add_qml_module(chattutorial-chapter1 - URI chapter1 + URI chattutorial QML_FILES - "main.qml" + "Main.qml" ) qt6_add_resources(chattutorial-chapter1 "conf" diff --git a/examples/quickcontrols/chattutorial/chapter1/main.qml b/examples/quickcontrols/chattutorial/chapter1/Main.qml index d0651b5816..19496f44eb 100644 --- a/examples/quickcontrols/chattutorial/chapter1/main.qml +++ b/examples/quickcontrols/chattutorial/chapter1/Main.qml @@ -1,4 +1,4 @@ -// Copyright (C) 2017 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick diff --git a/examples/quickcontrols/chattutorial/chapter1/chapter1.pro b/examples/quickcontrols/chattutorial/chapter1/chapter1.pro index 40c7d2ff7d..323b0709d4 100644 --- a/examples/quickcontrols/chattutorial/chapter1/chapter1.pro +++ b/examples/quickcontrols/chattutorial/chapter1/chapter1.pro @@ -1,12 +1,13 @@ TEMPLATE = app QT += qml quick -CONFIG += c++11 SOURCES += main.cpp -resources.files = main.qml -resources.prefix = qt/qml/chapter1/ +resources.files = \ + Main.qml \ + qmldir +resources.prefix = qt/qml/chattutorial/ RESOURCES += resources \ qtquickcontrols2.conf diff --git a/examples/quickcontrols/chattutorial/chapter1/main.cpp b/examples/quickcontrols/chattutorial/chapter1/main.cpp index 7252c0c3ad..73d4bf3b63 100644 --- a/examples/quickcontrols/chattutorial/chapter1/main.cpp +++ b/examples/quickcontrols/chattutorial/chapter1/main.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2017 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QGuiApplication> @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/qt/qml/chapter1/main.qml"))); + engine.loadFromModule("chattutorial", "Main"); return app.exec(); } diff --git a/examples/quickcontrols/chattutorial/chapter1/qmldir b/examples/quickcontrols/chattutorial/chapter1/qmldir new file mode 100644 index 0000000000..1044557225 --- /dev/null +++ b/examples/quickcontrols/chattutorial/chapter1/qmldir @@ -0,0 +1,2 @@ +module chattutorial +Main 1.0 Main.qml |