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 56 of file qabstractsliderisnippet.cpp.

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

Referenced by QtSliderFactory::createEditor(), QtScrollBarFactory::createEditor(), Window::createSlider(), LCDRange::init(), LCDRange::LCDRange(), LCDRange::setRange(), QListView::updateGeometries(), PieView::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