I have a frameless ApplicationWindow and I wanted to make it draggable using the answer of this question. However, as someone said in a comment, when I move the window fastly, it jiggles a lot.
I've been trying to improve it but without success.
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("WIP")
id: mainWindow
flags: Qt.SubWindow | Qt.Tool | Qt.FramelessWindowHint | Qt.WindowSystemMenuHint
header: ToolBar{
MouseArea{
anchors.fill: parent
onDoubleClicked: mainWindow.visibility!="2"?mainWindow.showNormal():mainWindow.showMaximized()
id: maMainWindow
property variant clickPos: "0,0"
onPressed: {
clickPos = Qt.point(mouse.x,mouse.y)
}
onPositionChanged: {
var delta = Qt.point(mouse.x-clickPos.x, mouse.y-clickPos.y)
mainWindow.x += delta.x;
mainWindow.y += delta.y;
}
}
}
}
If I add tabs and some elements it makes it worse.
Can C++ improve its performance somehow?