Qt Quick scalable custom window
Solved
General and Desktop
-
@orzel1244 With some mouse handling using
MouseArea
it can be achieved. This is the so far the best I was able to do:Moving Frameless Window:
Window { id: window width: 400 height: 400 visible: true flags: Qt.FramelessWindowHint MouseArea { anchors.fill: parent hoverEnabled: true property point lastPos onPressed: lastPos = Qt.point(mouseX, mouseY) onPositionChanged: { window.x += (mouseX - lastPos.x) window.y += (mouseY - lastPos.y) } } }
Resizing Frameless Window:
Window { id: win width: 300 height: 300 visible: true flags: Qt.FramelessWindowHint Rectangle { anchors.fill: parent color: "lightgray" } MouseArea { anchors.fill: parent onPositionChanged: { win.width += mouseX-win.width win.height += mouseY-win.height } } }
You can try to manipulate the above code to accomplish both of them in a single Window;)
-
@orzel1244 ;) cheers.
-
What exactly Isn't?
-
@orzel1244 That was just a basic idea. You can modify it as per your needs. Then you could post the changes here and someone will try to make it more better :)