summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2015-12-11 08:58:14 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-11 15:01:07 +0000
commit8cdd72afc11d96ec41f65577b38ffea63bc7294c (patch)
tree0a3533ebd8f3dedcc981790813e57a459465685d
parentaf118233d6f7d67cfdb1c545396dcbce00cbc892 (diff)
Pure QML example: add shortcut to quit
On the eglfs platform, there is no obvious way to exit back to a console, so it's too easy to get stuck in this example and need to reboot via ssh or some such. Ctrl-Alt-Backspace is the historical way of exiting from an X11 or Weston session, so we use it here. Change-Id: Ibe93acb0a81ef47384d5449760f25ad6e4cac8d8 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-rw-r--r--examples/wayland/pure-qml/qml/Screen.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml
index 669d39c0e..c5df10e5f 100644
--- a/examples/wayland/pure-qml/qml/Screen.qml
+++ b/examples/wayland/pure-qml/qml/Screen.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.5
import QtQuick.Window 2.2
import QtWayland.Compositor 1.0
@@ -75,5 +75,9 @@ WaylandOutput {
inputDevice: output.compositor.defaultInputDevice
}
}
+ Shortcut {
+ sequence: "Ctrl+Alt+Backspace"
+ onActivated: Qt.quit()
+ }
}
}