Figure out how to pass in properties.

This commit is contained in:
Dorian 2018-02-13 15:18:59 -05:00
parent 7b36312ed3
commit 329152860d
2 changed files with 9 additions and 3 deletions

View File

@ -29,7 +29,7 @@ Rectangle {
}
Rectangle {
id: version
id: versionLabel
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
@ -41,7 +41,7 @@ Rectangle {
Text {
// TODO: Add in a way to dynamically get the version of the app.
text: "Version 0.4.0"
text: "v" + appVersion
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20

View File

@ -2,15 +2,21 @@ import QtQuick 2.9
import QtQuick.Window 2.2
Window {
id: mainWindow
property var appVersion: "0.4.0"
visible: true
width: 800
height: 600
title: qsTr("justCheckers")
title: qsTr("justCheckers v" + appVersion)
Loader {
id: appPage
source: "Menu.qml"
anchors.fill: parent
property var version: appVersion
}
MouseArea {