summaryrefslogtreecommitdiffstats
path: root/examples/wayland/multi-screen/qml/Screen.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-10-07 11:15:32 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-11-23 14:32:31 +0000
commit2f841b18ce6553f027e80fa8da878ea409af280a (patch)
treeb0a515292a373243367304c3b238fd7b7231e6f0 /examples/wayland/multi-screen/qml/Screen.qml
parent767ee09aba517b0c680dd67a0f213a483429b65f (diff)
multi-screen example: create an output for each screen
Use Instantiator to create an output for each screen that exists. Change-Id: Ice74632c36a9e0d55bd9e8b6d04022f5c10de6f0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'examples/wayland/multi-screen/qml/Screen.qml')
-rw-r--r--examples/wayland/multi-screen/qml/Screen.qml13
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/wayland/multi-screen/qml/Screen.qml b/examples/wayland/multi-screen/qml/Screen.qml
index 7e2eb01dc..26132f754 100644
--- a/examples/wayland/multi-screen/qml/Screen.qml
+++ b/examples/wayland/multi-screen/qml/Screen.qml
@@ -40,18 +40,25 @@
import QtQuick 2.0
import QtWayland.Compositor 1.0
-import QtQuick.Window 2.2
+import QtQuick.Window 2.3
WaylandOutput {
id: screen
property variant viewsBySurface: ({})
property alias surfaceArea: background
property alias text: t.text
+ property alias targetScreen: win.targetScreen
sizeFollowsWindow: true
+ property bool windowed: false
+
window: Window {
- width: 1024
- height: 760
+ id: win
+ x: targetScreen.virtualX
+ y: targetScreen.virtualY
+ width: 800
+ height: 800
+ visibility: windowed ? Window.Windowed : Window.FullScreen
visible: true
WaylandMouseTracker {