-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.5.1, 5.15.8, 6.3.1
-
Qt 5.5.1, Qt Creator 3.5.1, Windows 7
Create a slider in an item and customize it like in the following code :
Item {
id: item1
x: 0
y: 0
width: 200
height: parent.height
Rectangle {
id: background
anchors.fill: parent;
color:Qt.rgba(0.9,0.9,0.9,1);
}
Slider {
anchors.centerIn: parent
orientation: Qt.Vertical
height: parent.height
style: SliderStyle {
groove: Rectangle {
implicitWidth: 200
implicitHeight: 8
color: "gray"
radius: 8
}
handle: Rectangle {
anchors.centerIn: parent
color: control.pressed ? "white" : "lightgray"
border.color: "gray"
border.width: 2
width: 20
height: 20
radius: 6
}
}
}
}
The problem appears when the size of the handle is changed to have it wider than high, so change in the handle :
width: 20
height: 80 //for example
And then, when the handle is moved, it doesn't stay under the mouse cursor but there is an offset between the two. The greater the height of the handle is, the greater the offset is.
This is even reproducible with Qt6.3.1 and 5.15.8