Detailed Description
A QLSlider is a QLWidget that provides a mechanism for changing a numerically-valued LAttribute within a limited range.
If you need a slider that can fit into smaller spaces, consider using a QLMiniSlider.
By click-dragging on the slider handle, a user can change the attribute linked to it.
The following demonstrates how to link the slider's value attribute with another attribute:
QLWidget* widget = new QLWidget;
QLSlider* slider = new QLSlider(30.0);
slider->value()->set_link_attribute(widget->border_thickness());
In the example, after the call to LAttribute::set_link_attribute(), the widget's border thickness will change when the slider is interacted with.
Member Function Documentation
QLSlider(QWidget* parent = nullptr)
Constructs a decimal slider whose value is equal-to or between 0 and 1.
QLSlider(int limit, QWidget* parent = nullptr)
Constructs a slider with a fixed limit.
void set_limit(int limit)
Sets the upper limit of the slider.
LAttribute* value()
Returns a reference to the value attribute of the slider.