summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-02-03 11:23:15 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-06-19 07:04:31 +0000
commitec0a5db0479645b14efea2525b6a801b6cf665d6 (patch)
tree4abd1e66f3f9c15f73bb271c95c99fa5a7b70609
parenta7d7bb54ad30d10370d80dc91adbc329d5a350fa (diff)
multi-screen example: add control-alt-backspace Shortcut to quit
Same as 8cdd72afc11d96ec41f65577b38ffea63bc7294c on the pure-qml example. 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: Ife3318675f1b5dbe640feb8f3f99e80efbd5dcfd Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
-rw-r--r--examples/wayland/multi-screen/qml/Screen.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/wayland/multi-screen/qml/Screen.qml b/examples/wayland/multi-screen/qml/Screen.qml
index 815140710..21f2d1266 100644
--- a/examples/wayland/multi-screen/qml/Screen.qml
+++ b/examples/wayland/multi-screen/qml/Screen.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.8
import QtWayland.Compositor 1.0
import QtQuick.Window 2.3
@@ -95,5 +95,9 @@ WaylandOutput {
visible: mouseTracker.containsMouse
}
}
+ Shortcut {
+ sequence: "Ctrl+Alt+Backspace"
+ onActivated: Qt.quit()
+ }
}
}