import QtQuick import QtQuick.Controls // Spike UI: proves text commits, keysyms and dragging. Replaced by the real // keyboard in milestone 2. Window { id: root required property var backend property var placement: null width: 720 height: 120 visible: false color: "#d1d3d9" Rectangle { id: handle anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 6 } width: 120; height: 6; radius: 3 color: "#8e8e93" DragHandler { target: null margin: 12 property point last onActiveChanged: last = centroid.scenePressPosition onCentroidChanged: { if (!active || !root.placement) return const p = centroid.scenePosition root.placement.moveBy(p.x - last.x, p.y - last.y) } } } Row { anchors.centerIn: parent spacing: 8 Button { text: "héllo👍"; focusPolicy: Qt.NoFocus; onClicked: root.backend.commitText(text) } Button { text: "⌫"; focusPolicy: Qt.NoFocus; onClicked: root.backend.sendKeysym(0xff08) } Button { text: "⏎"; focusPolicy: Qt.NoFocus; onClicked: root.backend.sendKeysym(0xff0d) } Label { anchors.verticalCenter: parent.verticalCenter; text: root.backend.active ? "active" : "inactive" } } }