Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QAbstractSlider::setRange ( int  min,
int  max 
) [inherited]

Sets the slider's minimum to min and its maximum to max.

If max is smaller than min, min becomes the only legal value.

See also:
minimum maximum

Definition at line 213 of file qabstractslider.cpp.

References QAbstractSlider::rangeChanged(), and QAbstractSlider::sliderChange().

Referenced by QListView::updateGeometries(), and QTableView::updateGeometries().

    int oldMin = d->minimum;
    int oldMax = d->maximum;
    d->minimum = min;
    d->maximum = qMax(min, max);
    if (oldMin != d->minimum || oldMax != d->maximum) {
        emit rangeChanged(d->minimum, d->maximum);
        setValue(d->value); // re-bound

Generated by  Doxygen 1.6.0   Back to index