446 Q_D(QSpinBox); |
446 Q_D(QSpinBox); |
447 d->setRange(QVariant(minimum), QVariant(maximum)); |
447 d->setRange(QVariant(minimum), QVariant(maximum)); |
448 } |
448 } |
449 |
449 |
450 /*! |
450 /*! |
451 This virtual function is used by the spin box whenever it needs |
451 This virtual function is used by the spin box whenever it needs to |
452 to display the given \a value. The default implementation returns |
452 display the given \a value. The default implementation returns a |
453 a string containing \a value printed in the standard way using |
453 string containing \a value printed in the standard way using |
454 QWidget::locale().toString(). Reimplementations may return anything. (See |
454 QWidget::locale().toString(), but with the thousand separator |
455 the example in the detailed description.) |
455 removed. Reimplementations may return anything. (See the example |
|
456 in the detailed description.) |
456 |
457 |
457 Note: QSpinBox does not call this function for specialValueText() |
458 Note: QSpinBox does not call this function for specialValueText() |
458 and that neither prefix() nor suffix() should be included in the |
459 and that neither prefix() nor suffix() should be included in the |
459 return value. |
460 return value. |
460 |
461 |
461 If you reimplement this, you may also need to reimplement |
462 If you reimplement this, you may also need to reimplement |
462 valueFromText() and validate() |
463 valueFromText() and validate() |
463 |
464 |
464 \sa valueFromText(), validate() |
465 \sa valueFromText(), validate(), QLocale::groupSeparator() |
465 */ |
466 */ |
466 |
467 |
467 QString QSpinBox::textFromValue(int value) const |
468 QString QSpinBox::textFromValue(int value) const |
468 { |
469 { |
469 QString str = locale().toString(value); |
470 QString str = locale().toString(value); |