![]() |
Home · Overviews · Examples |
The QAbstractSlider class provides an integer value within a range. More...
Inherits QWidget.
Inherited by QDial, QScrollBar, and QSlider.
The QAbstractSlider class provides an integer value within a range.
The class is designed as a common super class for widgets like QScrollBar, QSlider and QDial.
Here are the main properties of the class:
Unity (1) may be viewed as a third step size. setValue lets you set the current value to any integer in the allowed range, not just minimum + n * singleStep for integer values of n. Some widgets may allow the user to set any value at all; others may just provide multiples of singleStep or pageStep.
QAbstractSlider emits a comprehensive set of signals:
Signal | Emitted when |
---|---|
valueChanged | the value has changed. The tracking determines whether this signal is emitted during user interaction. |
sliderPressed | the user starts to drag the slider. |
sliderMoved | the user drags the slider. |
sliderReleased | the user releases the slider. |
actionTriggered | a slider action was triggerd. |
rangeChanged | a the range has changed. |
QAbstractSlider provides a virtual sliderChange function that is well suited for updating the on-screen representation of sliders. By calling triggerAction, subclasses trigger slider actions. Two helper functions QStyle::sliderPositionFromValue() and QStyle::sliderValueFromPosition() help subclasses and styles to map screen coordinates to logical range values.
See also QAbstractSpinBox, QSlider, QDial, QScrollBar, and Sliders Example.
Copyright © 2008 Trolltech | Trademarks | Qt Jambi 4.3.5_01 |