Move the logout button to the page’s toolbar
This commit is contained in:
parent
7343174056
commit
5cc7192387
|
@ -1,23 +1,22 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Page {
|
||||
title: qsTr("Reservations")
|
||||
|
||||
Button {
|
||||
action: logoutAction
|
||||
}
|
||||
|
||||
Action {
|
||||
id: logoutAction
|
||||
header: ToolBar {
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
ToolButton {
|
||||
icon.name: "system-log-out"
|
||||
shortcut: "Ctrl+L"
|
||||
text: qsTr("&Log out")
|
||||
|
||||
onTriggered: function () {
|
||||
onClicked: function () {
|
||||
Database.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue