Compare commits
No commits in common. "98a30294446aab98c3ca924d2157136285a1f8b6" and "bcf6b64a7a9c57690bf4052a7902536e3ce79480" have entirely different histories.
98a3029444
...
bcf6b64a7a
3 changed files with 138 additions and 67 deletions
|
@ -1,80 +1,63 @@
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls.Basic
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
//import "Main.qml" as M
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
|
|
||||||
SystemPalette { id: activeColors; colorGroup: SystemPalette.Active }
|
|
||||||
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
|
||||||
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
|
||||||
|
|
||||||
function getColors() {
|
|
||||||
return root.active ? activeColors : inactiveColors;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
width: 400
|
width: 400
|
||||||
height: 400
|
height: 400
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
color: getColors().window
|
TableView {
|
||||||
|
anchors.fill: parent
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 1
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
Label{
|
model: TableModel {
|
||||||
id: loginL
|
TableModelColumn { display: "checked" }
|
||||||
anchors{
|
TableModelColumn { display: "amount" }
|
||||||
verticalCenter: parent.verticalCenter
|
TableModelColumn { display: "fruitType" }
|
||||||
verticalCenterOffset: -70
|
TableModelColumn { display: "fruitName" }
|
||||||
horizontalCenter: parent.horizontalCenter
|
TableModelColumn { display: "fruitPrice" }
|
||||||
|
|
||||||
|
// Each row is one type of fruit that can be ordered
|
||||||
|
rows: [
|
||||||
|
{
|
||||||
|
// Each property is one cell/column.
|
||||||
|
checked: false,
|
||||||
|
amount: 1,
|
||||||
|
fruitType: "Apple",
|
||||||
|
fruitName: "Granny Smith",
|
||||||
|
fruitPrice: 1.50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
checked: true,
|
||||||
|
amount: 4,
|
||||||
|
fruitType: "Orange",
|
||||||
|
fruitName: "Navel",
|
||||||
|
fruitPrice: 2.50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
checked: false,
|
||||||
|
amount: 1,
|
||||||
|
fruitType: "Banana",
|
||||||
|
fruitName: "Cavendish",
|
||||||
|
fruitPrice: 3.50
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
delegate: TextInput {
|
||||||
|
text: model.display
|
||||||
|
padding: 12
|
||||||
|
selectByMouse: true
|
||||||
|
|
||||||
|
onAccepted: model.display = text
|
||||||
|
|
||||||
text: qsTr("Login")
|
Rectangle {
|
||||||
font.pointSize: 20
|
anchors.fill: parent
|
||||||
font.bold: true
|
color: "#efefef"
|
||||||
|
z: -1
|
||||||
color: getColor().text
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField {
|
|
||||||
|
|
||||||
id: nameT
|
|
||||||
anchors{
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
topMargin: 5
|
|
||||||
top: loginL.bottom
|
|
||||||
}
|
}
|
||||||
|
|
||||||
placeholderText: qsTr("Name")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField {
|
|
||||||
id: passwordT
|
|
||||||
anchors{
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
topMargin: 5
|
|
||||||
top: nameT.bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
placeholderText: qsTr("Password")
|
|
||||||
|
|
||||||
echoMode: TextInput.Password
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
id: submitB
|
|
||||||
anchors{
|
|
||||||
right: passwordT.right
|
|
||||||
topMargin: 5
|
|
||||||
top: passwordT.bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
text: qsTr("Submit")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,5 +85,6 @@ Window {
|
||||||
var window = component.createObject(root)
|
var window = component.createObject(root)
|
||||||
window.show()
|
window.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
87
native/Main.qml.autosave
Normal file
87
native/Main.qml.autosave
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
|
Window {
|
||||||
|
SystemPalette { id: activeColors; colorGroup: SystemPalette.Active }
|
||||||
|
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
||||||
|
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
||||||
|
|
||||||
|
function getColors() {
|
||||||
|
return root.active ? activeColors : inactiveColors;
|
||||||
|
}
|
||||||
|
|
||||||
|
id: root
|
||||||
|
width: 640
|
||||||
|
height: 480
|
||||||
|
visible: true
|
||||||
|
color: getColors().window
|
||||||
|
|
||||||
|
title: qsTr("Alisa - License Managment")
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: s1
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
height: 400
|
||||||
|
border.width: 5
|
||||||
|
border.color: getColors().accent
|
||||||
|
color: getColors().midlight
|
||||||
|
}
|
||||||
|
|
||||||
|
TableView {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 1
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
model: Data {}
|
||||||
|
delegate: Rectangle {
|
||||||
|
color: getColors().base
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 50
|
||||||
|
border.width: 1
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: display
|
||||||
|
color: getColors().text
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
id: testB
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
text: qsTr("Test Window")
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
var component = Qt.createComponent("Test.qml")
|
||||||
|
var window = component.createObject(root)
|
||||||
|
window.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
id: loginScreenB
|
||||||
|
anchors {
|
||||||
|
left: testB.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
text: qsTr("Login Screen")
|
||||||
|
onClicked: {
|
||||||
|
var component = Qt.createComponent("LoginScreen.qml")
|
||||||
|
var window = component.createObject(root)
|
||||||
|
window.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue