
Originally Posted by
wysota
Are you sure the tick marks are positioned correctly?
Yes. When I used these lines of codes only it works perfectly.
Slider {
id: slider
anchors {
fill: parent
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
maximumValue: 80
minimumValue: 1
stepSize: 10
tickmarksEnabled: true
value: 40
}
Slider {
id: slider
anchors {
fill: parent
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
maximumValue: 80
minimumValue: 1
stepSize: 10
tickmarksEnabled: true
value: 40
}
To copy to clipboard, switch view to plain text mode
However after adding the style property with SliderStyle component, the problem occurs.
Slider {
id: slider
anchors {
fill: parent
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
style: SliderStyle {
groove: Rectangle {
color: "white"
implicitHeight: 8
implicitWidth: parent.width
radius: 6
}
}
maximumValue: 80
minimumValue: 1
stepSize: 10
tickmarksEnabled: true
value: 40
}
Slider {
id: slider
anchors {
fill: parent
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
style: SliderStyle {
groove: Rectangle {
color: "white"
implicitHeight: 8
implicitWidth: parent.width
radius: 6
}
}
maximumValue: 80
minimumValue: 1
stepSize: 10
tickmarksEnabled: true
value: 40
}
To copy to clipboard, switch view to plain text mode
Bookmarks