import QtQuick // Corner grip. The window grows from its top-left corner, so window // coordinates stay put while resizing: report each step's delta. Item { id: grip signal resized(real dw, real dh) implicitWidth: 28 implicitHeight: 28 // Two strokes across the corner, each from (w - d, h) to (w, h - d). Repeater { model: [9, 16] Rectangle { required property real modelData readonly property real inset: 4 width: modelData * Math.SQRT2 height: 2 radius: 1 color: Theme.handle rotation: -45 x: grip.width - inset - modelData / 2 - width / 2 y: grip.height - inset - modelData / 2 - height / 2 } } DragHandler { property point last target: null cursorShape: Qt.SizeFDiagCursor onActiveChanged: last = centroid.scenePressPosition onCentroidChanged: { if (!active) return const p = centroid.scenePosition grip.resized(p.x - last.x, p.y - last.y) last = p } } }