Refactor to external page start_page.qml
This commit is contained in:
parent
3caf7e5b8f
commit
af94fbfb0d
3 changed files with 17 additions and 9 deletions
|
@ -16,13 +16,5 @@ Kirigami.ApplicationWindow {
|
||||||
|
|
||||||
// Set the first page that will be loaded when the app opens
|
// Set the first page that will be loaded when the app opens
|
||||||
// This can also be set to an id of a Kirigami.Page
|
// This can also be set to an id of a Kirigami.Page
|
||||||
pageStack.initialPage: Kirigami.ScrollablePage {
|
pageStack.initialPage: Qt.resolvedUrl("start_page.qml")
|
||||||
title: i18nc("@title", "Kountdown")
|
|
||||||
|
|
||||||
Controls.Label {
|
|
||||||
// Center label horizontally and vertically within parent object
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: i18n("Hello World!")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
15
src/contents/ui/start_page.qml
Normal file
15
src/contents/ui/start_page.qml
Normal 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!")
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file alias="main.qml">contents/ui/main.qml</file>
|
<file alias="main.qml">contents/ui/main.qml</file>
|
||||||
|
<file alias="start_page.qml">contents/ui/start_page.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue