Clarify valueChanged() signals' docs in QSpinBox and QDoubleSpinBox.
Explicitly mention that two signals are emitted and that the QString overload does include prefix() and suffix(). Task-number: QTBUG-26190 Change-Id: I90435779dcb2e4aa494c4b1b6e73e7f69d7998a4 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
parent
95cdcba91a
commit
53373bdd9f
@ -123,9 +123,10 @@ public:
|
|||||||
manually. The spin box supports integer values but can be extended to
|
manually. The spin box supports integer values but can be extended to
|
||||||
use different strings with validate(), textFromValue() and valueFromText().
|
use different strings with validate(), textFromValue() and valueFromText().
|
||||||
|
|
||||||
Every time the value changes QSpinBox emits the valueChanged()
|
Every time the value changes QSpinBox emits two valueChanged() signals,
|
||||||
signals. The current value can be fetched with value() and set
|
one providing an int and the other a QString. The QString overload
|
||||||
with setValue().
|
provides the value with both prefix() and suffix().
|
||||||
|
The current value can be fetched with value() and set with setValue().
|
||||||
|
|
||||||
Clicking the up/down buttons or using the keyboard accelerator's
|
Clicking the up/down buttons or using the keyboard accelerator's
|
||||||
up and down arrows will increase or decrease the current value in
|
up and down arrows will increase or decrease the current value in
|
||||||
@ -190,8 +191,7 @@ public:
|
|||||||
|
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
The new value is passed literally in \a text with no prefix() or
|
The new value is passed in \a text with prefix() and suffix().
|
||||||
suffix().
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -215,7 +215,8 @@ QSpinBox::QSpinBox(QWidget *parent)
|
|||||||
\brief the value of the spin box
|
\brief the value of the spin box
|
||||||
|
|
||||||
setValue() will emit valueChanged() if the new value is different
|
setValue() will emit valueChanged() if the new value is different
|
||||||
from the old one.
|
from the old one. The value property has a second notifier
|
||||||
|
signal which includes the spin box's prefix and suffix.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int QSpinBox::value() const
|
int QSpinBox::value() const
|
||||||
@ -378,7 +379,7 @@ void QSpinBox::setMinimum(int minimum)
|
|||||||
|
|
||||||
\brief the maximum value of the spin box
|
\brief the maximum value of the spin box
|
||||||
|
|
||||||
When setting this property the \l minimum is adjusted
|
When setting this property the minimum is adjusted
|
||||||
if necessary, to ensure that the range remains valid.
|
if necessary, to ensure that the range remains valid.
|
||||||
|
|
||||||
The default maximum value is 99.
|
The default maximum value is 99.
|
||||||
@ -510,8 +511,10 @@ void QSpinBox::fixup(QString &input) const
|
|||||||
values but can be extended to use different strings with
|
values but can be extended to use different strings with
|
||||||
validate(), textFromValue() and valueFromText().
|
validate(), textFromValue() and valueFromText().
|
||||||
|
|
||||||
Every time the value changes QDoubleSpinBox emits the
|
Every time the value changes QDoubleSpinBox emits two
|
||||||
valueChanged() signal. The current value can be fetched with
|
valueChanged() signals, one taking providing a double and the other
|
||||||
|
a QString. The QString overload provides the value with both
|
||||||
|
prefix() and suffix(). The current value can be fetched with
|
||||||
value() and set with setValue().
|
value() and set with setValue().
|
||||||
|
|
||||||
Note: QDoubleSpinBox will round numbers so they can be displayed
|
Note: QDoubleSpinBox will round numbers so they can be displayed
|
||||||
@ -559,8 +562,7 @@ void QSpinBox::fixup(QString &input) const
|
|||||||
|
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
The new value is passed literally in \a text with no prefix() or
|
The new value is passed in \a text with prefix() and suffix().
|
||||||
suffix().
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -582,7 +584,8 @@ QDoubleSpinBox::QDoubleSpinBox(QWidget *parent)
|
|||||||
\brief the value of the spin box
|
\brief the value of the spin box
|
||||||
|
|
||||||
setValue() will emit valueChanged() if the new value is different
|
setValue() will emit valueChanged() if the new value is different
|
||||||
from the old one.
|
from the old one. The value property has a second notifier
|
||||||
|
signal which includes the spin box's prefix and suffix.
|
||||||
|
|
||||||
Note: The value will be rounded so it can be displayed with the
|
Note: The value will be rounded so it can be displayed with the
|
||||||
current setting of decimals.
|
current setting of decimals.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user