Slider
import { Slider, VerticalBox } from "std-widgets.slint";export component Example inherits Window { width: 200px; height: 40px;
VerticalBox { alignment: center;
Slider { value: 42; } }
}slint
enabled
Section titled “enabled”booldefault: true
如果 enabled 为 false,则无法与滑块交互。
has-focus
Section titled “has-focus”bool(out)
当滑块当前具有焦点时设置为 true
minimum
Section titled “minimum”maximum
Section titled “maximum”orientation
Section titled “orientation”enum Orientationdefault: horizontal
描述 Slider 的方向,垂直或水平。
changed(float)
Section titled “changed(float)”值发生了改变
Slider { changed(value) => { debug("New value: ", value); }}slint
released(float)
Section titled “released(float)”当用户完成更改滑块的值时调用,即在旋钮上的按压被释放或方向键被松开时。
Slider { released(position) => { debug("Released at position: ", position); }}slint
© 2026 SixtyFPS GmbH