Refactor to external page start_page.qml

This commit is contained in:
Florian RICHER 2024-01-01 16:19:51 +01:00
parent 3caf7e5b8f
commit af94fbfb0d
3 changed files with 17 additions and 9 deletions

View file

@ -16,13 +16,5 @@ Kirigami.ApplicationWindow {
// Set the first page that will be loaded when the app opens
// This can also be set to an id of a Kirigami.Page
pageStack.initialPage: Kirigami.ScrollablePage {
title: i18nc("@title", "Kountdown")
Controls.Label {
// Center label horizontally and vertically within parent object
anchors.centerIn: parent
text: i18n("Hello World!")
}
}
pageStack.initialPage: Qt.resolvedUrl("start_page.qml")
}

View file

@ -0,0 +1,15 @@
// Includes relevant modules used by the QML
import QtQuick 2.15
import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.20 as Kirigami
Kirigami.ScrollablePage {
title: i18nc("@title", "Kountdown")
Controls.Label {
// Center label horizontally and vertically within parent object
anchors.centerIn: parent
text: i18n("Hello World!")
}
}

View file

@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
<file alias="main.qml">contents/ui/main.qml</file>
<file alias="start_page.qml">contents/ui/start_page.qml</file>
</qresource>
</RCC>