Files
evcharger-app/AppInstance.qml
T

32 lines
666 B
QML
Raw Normal View History

import QtQuick
import QtQuick.Controls.Material
import QtQuick.Layouts
import EVChargerApp
2024-07-12 22:21:41 +02:00
AnimatedStackView {
id: stackView
function backPressed() {
2024-07-12 22:21:41 +02:00
if (stackView.currentItem.backPressed())
return true
if (depth > 1) {
pop()
return true
}
2024-07-12 22:21:41 +02:00
return false
}
initialItem: DeviceListScreen {
id: deviceListScreen
2024-07-12 22:21:41 +02:00
onDeviceSelected: (url, password) => stackView.push(deviceScreenComponent, { url, password })
}
Component {
2024-07-12 22:21:41 +02:00
id: deviceScreenComponent
DeviceScreen {
onCloseRequested: stackView.pop(deviceListScreen)
}
}
}