From 8cdd72afc11d96ec41f65577b38ffea63bc7294c Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 11 Dec 2015 08:58:14 +0100 Subject: 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 --- examples/wayland/pure-qml/qml/Screen.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/wayland/pure-qml/qml') 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() + } } } -- cgit v1.2.3