From 163441c4ef448ccba2fcbd1939f58064ef6cdc00 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Sat, 6 Jun 2020 21:21:18 -0400 Subject: [PATCH] Put in skeleton ui. --- src/contents/ui/main.qml | 18 +++++++++++++++--- src/main.cpp | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index 06a5cb7..8d8fc8e 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -11,12 +11,24 @@ Kirigami.ApplicationWindow { pageStack.initialPage: mainPageComponent contextDrawer: Kirigami.ContextDrawer {} - /* Component { id: mainPageComponent Kirigami.Page { + id: mainPage + contextualActions: [ + Kirigami.Action { + iconName: "help-about" + text: qsTr("About") + onTriggered: { + pageStack.replace(aboutPageComponent); + } + } + ] + title: "Vehicles" + } + /*Kirigami.Page { id: mainPage mainAction: Kirigami.Action { iconName: "view-refresh" @@ -236,7 +248,7 @@ Kirigami.ApplicationWindow { } } } - } + }*/ } Component { @@ -253,5 +265,5 @@ Kirigami.ApplicationWindow { } aboutData: appAboutData } - }*/ + } } diff --git a/src/main.cpp b/src/main.cpp index 5b1de7a..34a7864 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #include #include #include +#include Q_DECL_EXPORT int main(int argc, char *argv[]) { @@ -67,6 +68,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) } QQmlApplicationEngine engine; + engine.rootContext()->setContextProperty(QStringLiteral("appAboutData"), QVariant::fromValue(aboutData)); engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); if (engine.rootObjects().isEmpty()) { -- GitLab