import QtQuick // The grab bar under the floating keyboard. Emits how far it was dragged; // moving the window is up to the owner. Item { id: handle signal moved(real dx, real dy) implicitHeight: 22 Rectangle { anchors.centerIn: parent width: 120 height: 5 radius: height / 2 color: Theme.handle } DragHandler { target: null // The window follows the pointer, so the pointer stays near its press // position in window coordinates: measure each step from there. onCentroidChanged: { if (active) handle.moved(centroid.scenePosition.x - centroid.scenePressPosition.x, centroid.scenePosition.y - centroid.scenePressPosition.y) } } }