Kyl*_*and 0 qt scroll scrollview qml
我想让 ScrollView 的滚动条比默认值更宽,但我看不到任何width
属性,即使是ScrollViewStyle
元素frame
组件的一部分。
为了使滚动条较宽,可以在更改以下四个属性ScrollViewStyle
与您的自定义组件:handle
,scrollBarBackground
,decrementControl
,和incrementControl
(它可能看起来奇怪,如果你不改变所有的人)。例如,
ScrollView {
style: ScrollViewStyle {
handle: Rectangle {
implicitWidth: 50
implicitHeight: 30
color: "red"
}
scrollBarBackground: Rectangle {
implicitWidth: 50
implicitHeight: 30
color: "black"
}
decrementControl: Rectangle {
implicitWidth: 50
implicitHeight: 30
color: "green"
}
incrementControl: Rectangle {
implicitWidth: 50
implicitHeight: 30
color: "blue"
}
}
//...
}
Run Code Online (Sandbox Code Playgroud)
它看起来像这样:
归档时间: |
|
查看次数: |
3704 次 |
最近记录: |