Fix layouts and localstorage examples

The layouts and localstorage examples wouldn't work properly, since the
path to the initial qml file given to the engine didn't start with
"qrc:/qt/qml"

Pick-to: 6.5
Change-Id: I26b5bbf3f6e7078c4f4aba6bab6fc06451b49082
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Oliver Eftevaag 2023-01-11 09:41:35 +01:00
parent 267da2e7a9
commit a62da4b06e
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
// Copyright (C) 2016 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:///layouts/layouts.qml")));
engine.load(QUrl(QStringLiteral("qrc:/qt/qml/layouts/layouts.qml")));
return app.exec();
}

View File

@ -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>
#include <QQmlApplicationEngine>
@ -8,7 +8,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/localstorage/localstorage.qml")));
engine.load(QUrl(QStringLiteral("qrc:/qt/qml/localstorage/localstorage.qml")));
return app.exec();
}