From a007f8567e17863184f379f1e48fd2f9235e0049 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 8 Jun 2022 12:55:22 -0400 Subject: [PATCH] Add simple username/password field --- launcher/tablet/qml/main.qml | 39 ++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/launcher/tablet/qml/main.qml b/launcher/tablet/qml/main.qml index 4f8ab63..a19f54e 100644 --- a/launcher/tablet/qml/main.qml +++ b/launcher/tablet/qml/main.qml @@ -1,5 +1,5 @@ import QtQuick 2.7 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.15 import QtQuick.Window 2.0 ApplicationWindow { @@ -11,9 +11,40 @@ ApplicationWindow { visible: true Label { - text: "Hello, world!" + id: usernameLabel - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + text: "Username" + } + + TextField { + id: usernameField + + anchors.top: usernameLabel.bottom + } + + Label { + id: passwordLabel + + text: "Password" + + anchors.top: usernameField.bottom + } + + TextField { + id: passwordField + + echoMode: TextInput.Password + + anchors.top: passwordLabel.bottom + } + + Button { + id: loginButton + + text: "Login" + + anchors.top: passwordField.bottom + + onClicked: print("Hooray!"); } } \ No newline at end of file