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

void QAbstractSpinBox::selectAll (  )  [slot, inherited]

Selects all the text in the spinbox except the prefix and suffix.

Definition at line 488 of file qabstractspinbox.cpp.

Referenced by QAbstractSpinBox::contextMenuEvent(), QAbstractSpinBox::focusInEvent(), QAbstractSpinBox::keyPressEvent(), QDateTimeEdit::keyPressEvent(), and QAbstractSpinBox::stepBy().

{
    Q_D(QAbstractSpinBox);


    if (!d->specialValue()) {
        const int tmp = d->edit->displayText().size() - d->suffix.size();
        d->edit->setSelection(tmp, -(tmp - d->prefix.size()));
    } else {
        d->edit->selectAll();
    }
}


Generated by  Doxygen 1.6.0   Back to index