magpie/qml/main.qml

46 lines
804 B
QML

import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
ApplicationWindow {
property int counter: 0
id: window
width: 640
height: 480
visible: true
title: "Megpie"
header: Label {
text: stack.currentItem.title
horizontalAlignment: Text.AlignHCenter
}
StackView {
id: stack
initialItem: welcome
anchors.fill: parent
}
Welcome {
id: welcome
onPickServer: function (address) {
pick.address = address;
stack.push(pick)
}
}
ServerPick {
visible: false
id: pick
onBack: stack.pop()
onSuccess: function (address) {
welcome.serverAddress = address;
stack.pop();
}
}
}