diff options
author | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2015-12-11 08:58:14 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-11 15:01:07 +0000 |
commit | 8cdd72afc11d96ec41f65577b38ffea63bc7294c (patch) | |
tree | 0a3533ebd8f3dedcc981790813e57a459465685d /examples | |
parent | af118233d6f7d67cfdb1c545396dcbce00cbc892 (diff) | |
download | qtwayland-8cdd72afc11d96ec41f65577b38ffea63bc7294c.tar.gz |
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>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/pure-qml/qml/Screen.qml | 6 |
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 669d39c0..c5df10e5 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() + } } } |