[][src]Struct qt_widgets::QDoubleSpinBox

#[repr(C)]
pub struct QDoubleSpinBox { /* fields omitted */ }

The QDoubleSpinBox class provides a spin box widget that takes doubles.

C++ class: QDoubleSpinBox.

C++ documentation:

The QDoubleSpinBox class provides a spin box widget that takes doubles.

QDoubleSpinBox allows the user to choose a value by clicking the up and down buttons or by pressing Up or Down on the keyboard to increase or decrease the value currently displayed. The user can also type the value in manually. The spin box supports double values but can be extended to use different strings with validate(), textFromValue() and valueFromText().

Every time the value changes QDoubleSpinBox emits two 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().

Note: QDoubleSpinBox will round numbers so they can be displayed with the current precision. In a QDoubleSpinBox with decimals set to 2, calling setValue(2.555) will cause value() to return 2.56.

Clicking the up and down buttons or using the keyboard accelerator's Up and Down arrows will increase or decrease the current value in steps of size singleStep(). If you want to change this behavior you can reimplement the virtual function stepBy(). The minimum and maximum value and the step size can be set using one of the constructors, and can be changed later with setMinimum(), setMaximum() and setSingleStep(). The spinbox has a default precision of 2 decimal places but this can be changed using setDecimals().

Most spin boxes are directional, but QDoubleSpinBox can also operate as a circular spin box, i.e. if the range is 0.0-99.9 and the current value is 99.9, clicking "up" will give 0 if wrapping() is set to true. Use setWrapping() if you want circular behavior.

The displayed value can be prepended and appended with arbitrary strings indicating, for example, currency or the unit of measurement. See setPrefix() and setSuffix(). The text in the spin box is retrieved with text() (which includes any prefix() and suffix()), or with cleanText() (which has no prefix(), no suffix() and no leading or trailing whitespace).

It is often desirable to give the user a special (often default) choice in addition to the range of numeric values. See setSpecialValueText() for how to do this with QDoubleSpinBox.

Note: The displayed value of the QDoubleSpinBox is limited to 18 characters in addition to eventual prefix and suffix content. This limitation is used to keep the double spin box usable even with extremely large values.

Methods

impl QDoubleSpinBox[src]

pub fn slot_set_value(&self) -> Receiver<(c_double,)>[src]

This property holds the value of the spin box

Returns a built-in Qt slot QDoubleSpinBox::setValue that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the value of the spin box

setValue() will emit valueChanged() if the new value is different 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 current setting of decimals.

Access functions:

double value() const
void setValue(double val)

Notifier signal:

void valueChanged(double d)
void valueChanged(const QString &text)

See also decimals.

pub fn value_changed(&self) -> Signal<(c_double,)>[src]

This signal is emitted whenever the spin box's value is changed. The new value is passed in d.

Returns a built-in Qt signal QDoubleSpinBox::valueChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the spin box's value is changed. The new value is passed in d.

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(doubleSpinBox, static_cast<void(QDoubleSpinBox::)(double)>(&QDoubleSpinBox::valueChanged), [=](double d){ / ... */ });

Note: Notifier signal for property value.

pub fn value_changed2(&self) -> Signal<(*const QString,)>[src]

This is an overloaded function.

Returns a built-in Qt signal QDoubleSpinBox::valueChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This is an overloaded function.

The new value is passed in text with prefix() and suffix().

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(doubleSpinBox, static_cast<void(QDoubleSpinBox::)(const QString &)>(&QDoubleSpinBox::valueChanged), [=](const QString &text){ / ... */ });

Note: Notifier signal for property value.

pub unsafe fn clean_text(&self) -> CppBox<QString>[src]

This property holds the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.

Calls C++ function: QString QDoubleSpinBox::cleanText() const.

C++ documentation:

This property holds the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.

Access functions:

QString cleanText() const

See also text, QDoubleSpinBox::prefix, and QDoubleSpinBox::suffix.

pub unsafe fn decimals(&self) -> c_int[src]

This property holds the precision of the spin box, in decimals

Calls C++ function: int QDoubleSpinBox::decimals() const.

C++ documentation:

This property holds the precision of the spin box, in decimals

Sets how many decimals the spinbox will use for displaying and interpreting doubles.

Warning: The maximum value for decimals is DBL_MAX_10_EXP + DBL_DIG (ie. 323) because of the limitations of the double type.

Note: The maximum, minimum and value might change as a result of changing this property.

Access functions:

int decimals() const
void setDecimals(int prec)

pub unsafe fn fixup(&self, str: impl CastInto<MutRef<QString>>)[src]

Reimplemented from QAbstractSpinBox::fixup().

Calls C++ function: virtual void QDoubleSpinBox::fixup(QString& str) const.

C++ documentation:

Reimplemented from QAbstractSpinBox::fixup().

pub unsafe fn maximum(&self) -> c_double[src]

This property holds the maximum value of the spin box

Calls C++ function: double QDoubleSpinBox::maximum() const.

C++ documentation:

This property holds the maximum value of the spin box

When setting this property the minimum is adjusted if necessary, to ensure that the range remains valid.

The default maximum value is 99.99.

Note: The maximum value will be rounded to match the decimals property.

Access functions:

double maximum() const
void setMaximum(double max)

See also decimals and setRange().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDoubleSpinBox::metaObject() const.

pub unsafe fn minimum(&self) -> c_double[src]

This property holds the minimum value of the spin box

Calls C++ function: double QDoubleSpinBox::minimum() const.

C++ documentation:

This property holds the minimum value of the spin box

When setting this property the maximum is adjusted if necessary to ensure that the range remains valid.

The default minimum value is 0.0.

Note: The minimum value will be rounded to match the decimals property.

Access functions:

double minimum() const
void setMinimum(double min)

See also decimals, setRange(), and specialValueText.

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QDoubleSpinBox>
[src]

Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value, a step value of 1.0 and a precision of 2 decimal places. The value is initially set to 0.00. The spin box has the given parent.

Calls C++ function: [constructor] void QDoubleSpinBox::QDoubleSpinBox(QWidget* parent = …).

C++ documentation:

Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value, a step value of 1.0 and a precision of 2 decimal places. The value is initially set to 0.00. The spin box has the given parent.

See also setMinimum(), setMaximum(), and setSingleStep().

pub unsafe fn new_0a() -> CppBox<QDoubleSpinBox>[src]

The QDoubleSpinBox class provides a spin box widget that takes doubles.

Calls C++ function: [constructor] void QDoubleSpinBox::QDoubleSpinBox().

C++ documentation:

The QDoubleSpinBox class provides a spin box widget that takes doubles.

QDoubleSpinBox allows the user to choose a value by clicking the up and down buttons or by pressing Up or Down on the keyboard to increase or decrease the value currently displayed. The user can also type the value in manually. The spin box supports double values but can be extended to use different strings with validate(), textFromValue() and valueFromText().

Every time the value changes QDoubleSpinBox emits two 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().

Note: QDoubleSpinBox will round numbers so they can be displayed with the current precision. In a QDoubleSpinBox with decimals set to 2, calling setValue(2.555) will cause value() to return 2.56.

Clicking the up and down buttons or using the keyboard accelerator's Up and Down arrows will increase or decrease the current value in steps of size singleStep(). If you want to change this behavior you can reimplement the virtual function stepBy(). The minimum and maximum value and the step size can be set using one of the constructors, and can be changed later with setMinimum(), setMaximum() and setSingleStep(). The spinbox has a default precision of 2 decimal places but this can be changed using setDecimals().

Most spin boxes are directional, but QDoubleSpinBox can also operate as a circular spin box, i.e. if the range is 0.0-99.9 and the current value is 99.9, clicking "up" will give 0 if wrapping() is set to true. Use setWrapping() if you want circular behavior.

The displayed value can be prepended and appended with arbitrary strings indicating, for example, currency or the unit of measurement. See setPrefix() and setSuffix(). The text in the spin box is retrieved with text() (which includes any prefix() and suffix()), or with cleanText() (which has no prefix(), no suffix() and no leading or trailing whitespace).

It is often desirable to give the user a special (often default) choice in addition to the range of numeric values. See setSpecialValueText() for how to do this with QDoubleSpinBox.

Note: The displayed value of the QDoubleSpinBox is limited to 18 characters in addition to eventual prefix and suffix content. This limitation is used to keep the double spin box usable even with extremely large values.

pub unsafe fn prefix(&self) -> CppBox<QString>[src]

This property holds the spin box's prefix

Calls C++ function: QString QDoubleSpinBox::prefix() const.

C++ documentation:

This property holds the spin box's prefix

The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

spinbox->setPrefix("$");

To turn off the prefix display, set this property to an empty string. The default is no prefix. The prefix is not displayed when value() == minimum() and specialValueText() is set.

If no prefix is set, prefix() returns an empty string.

Access functions:

QString prefix() const
void setPrefix(const QString &prefix)

See also suffix(), setSuffix(), specialValueText(), and setSpecialValueText().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QDoubleSpinBox::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QDoubleSpinBox::qt_metacast(const char* arg1).

pub unsafe fn set_decimals(&mut self, prec: c_int)[src]

This property holds the precision of the spin box, in decimals

Calls C++ function: void QDoubleSpinBox::setDecimals(int prec).

C++ documentation:

This property holds the precision of the spin box, in decimals

Sets how many decimals the spinbox will use for displaying and interpreting doubles.

Warning: The maximum value for decimals is DBL_MAX_10_EXP + DBL_DIG (ie. 323) because of the limitations of the double type.

Note: The maximum, minimum and value might change as a result of changing this property.

Access functions:

int decimals() const
void setDecimals(int prec)

pub unsafe fn set_maximum(&mut self, max: c_double)[src]

This property holds the maximum value of the spin box

Calls C++ function: void QDoubleSpinBox::setMaximum(double max).

C++ documentation:

This property holds the maximum value of the spin box

When setting this property the minimum is adjusted if necessary, to ensure that the range remains valid.

The default maximum value is 99.99.

Note: The maximum value will be rounded to match the decimals property.

Access functions:

double maximum() const
void setMaximum(double max)

See also decimals and setRange().

pub unsafe fn set_minimum(&mut self, min: c_double)[src]

This property holds the minimum value of the spin box

Calls C++ function: void QDoubleSpinBox::setMinimum(double min).

C++ documentation:

This property holds the minimum value of the spin box

When setting this property the maximum is adjusted if necessary to ensure that the range remains valid.

The default minimum value is 0.0.

Note: The minimum value will be rounded to match the decimals property.

Access functions:

double minimum() const
void setMinimum(double min)

See also decimals, setRange(), and specialValueText.

pub unsafe fn set_prefix(&mut self, prefix: impl CastInto<Ref<QString>>)[src]

This property holds the spin box's prefix

Calls C++ function: void QDoubleSpinBox::setPrefix(const QString& prefix).

C++ documentation:

This property holds the spin box's prefix

The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

spinbox->setPrefix("$");

To turn off the prefix display, set this property to an empty string. The default is no prefix. The prefix is not displayed when value() == minimum() and specialValueText() is set.

If no prefix is set, prefix() returns an empty string.

Access functions:

QString prefix() const
void setPrefix(const QString &prefix)

See also suffix(), setSuffix(), specialValueText(), and setSpecialValueText().

pub unsafe fn set_range(&mut self, min: c_double, max: c_double)[src]

Convenience function to set the minimum and maximum values with a single function call.

Calls C++ function: void QDoubleSpinBox::setRange(double min, double max).

C++ documentation:

Convenience function to set the minimum and maximum values with a single function call.

Note: The maximum and minimum values will be rounded to match the decimals property.

setRange(minimum, maximum);

is equivalent to:

setMinimum(minimum); setMaximum(maximum);

See also minimum and maximum.

pub unsafe fn set_single_step(&mut self, val: c_double)[src]

This property holds the step value

Calls C++ function: void QDoubleSpinBox::setSingleStep(double val).

C++ documentation:

This property holds the step value

When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the singleStep. The default value is 1.0. Setting a singleStep value of less than 0 does nothing.

Access functions:

double singleStep() const
void setSingleStep(double val)

pub unsafe fn set_step_type(&mut self, step_type: StepType)[src]

Sets the step type for the spin box to stepType, which is single step or adaptive decimal step.

Calls C++ function: void QDoubleSpinBox::setStepType(QAbstractSpinBox::StepType stepType).

C++ documentation:

Sets the step type for the spin box to stepType, which is single step or adaptive decimal step.

Adaptive decimal step means that the step size will continuously be adjusted to one power of ten below the current value. So when the value is 1100, the step is set to 100, so stepping up once increases it to 1200. For 1200 stepping up takes it to 1300. For negative values, stepping down from -1100 goes to -1200.

It also works for any decimal values, 0.041 is increased to 0.042 by stepping once.

Step direction is taken into account to handle edges cases, so that stepping down from 100 takes the value to 99 instead of 90. Thus a step up followed by a step down -- or vice versa -- always lands on the starting value; 99 -> 100 -> 99.

Setting this will cause the spin box to disregard the value of singleStep, although it is preserved so that singleStep comes into effect if adaptive decimal step is later turned off.

This function was introduced in Qt 5.12.

Note: Setter function for property stepType.

See also stepType().

This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn set_suffix(&mut self, suffix: impl CastInto<Ref<QString>>)[src]

This property holds the suffix of the spin box

Calls C++ function: void QDoubleSpinBox::setSuffix(const QString& suffix).

C++ documentation:

This property holds the suffix of the spin box

The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

spinbox->setSuffix(" km");

To turn off the suffix display, set this property to an empty string. The default is no suffix. The suffix is not displayed for the minimum() if specialValueText() is set.

If no suffix is set, suffix() returns an empty string.

Access functions:

QString suffix() const
void setSuffix(const QString &suffix)

See also prefix(), setPrefix(), specialValueText(), and setSpecialValueText().

pub unsafe fn set_value(&mut self, val: c_double)[src]

This property holds the value of the spin box

Calls C++ function: [slot] void QDoubleSpinBox::setValue(double val).

C++ documentation:

This property holds the value of the spin box

setValue() will emit valueChanged() if the new value is different 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 current setting of decimals.

Access functions:

double value() const
void setValue(double val)

Notifier signal:

void valueChanged(double d)
void valueChanged(const QString &text)

See also decimals.

pub unsafe fn single_step(&self) -> c_double[src]

This property holds the step value

Calls C++ function: double QDoubleSpinBox::singleStep() const.

C++ documentation:

This property holds the step value

When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the singleStep. The default value is 1.0. Setting a singleStep value of less than 0 does nothing.

Access functions:

double singleStep() const
void setSingleStep(double val)

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn step_type(&self) -> StepType[src]

This property holds the step type.

Calls C++ function: QAbstractSpinBox::StepType QDoubleSpinBox::stepType() const.

C++ documentation:

This property holds the step type.

The step type can be single step or adaptive decimal step.

Access functions:

QAbstractSpinBox::StepType stepType() const
void setStepType(QAbstractSpinBox::StepType stepType)

This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn suffix(&self) -> CppBox<QString>[src]

This property holds the suffix of the spin box

Calls C++ function: QString QDoubleSpinBox::suffix() const.

C++ documentation:

This property holds the suffix of the spin box

The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

spinbox->setSuffix(" km");

To turn off the suffix display, set this property to an empty string. The default is no suffix. The suffix is not displayed for the minimum() if specialValueText() is set.

If no suffix is set, suffix() returns an empty string.

Access functions:

QString suffix() const
void setSuffix(const QString &suffix)

See also prefix(), setPrefix(), specialValueText(), and setSpecialValueText().

pub unsafe fn text_from_value(&self, val: c_double) -> CppBox<QString>[src]

This virtual function is used by the spin box whenever it needs to display the given value. The default implementation returns a string containing value printed using QWidget::locale().toString(value, QLatin1Char('f'), decimals()) and will remove the thousand separator unless setGroupSeparatorShown() is set. Reimplementations may return anything.

Calls C++ function: virtual QString QDoubleSpinBox::textFromValue(double val) const.

C++ documentation:

This virtual function is used by the spin box whenever it needs to display the given value. The default implementation returns a string containing value printed using QWidget::locale().toString(value, QLatin1Char('f'), decimals()) and will remove the thousand separator unless setGroupSeparatorShown() is set. Reimplementations may return anything.

Note: QDoubleSpinBox does not call this function for specialValueText() and that neither prefix() nor suffix() should be included in the return value.

If you reimplement this, you may also need to reimplement valueFromText().

See also valueFromText() and QLocale::groupSeparator().

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDoubleSpinBox::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDoubleSpinBox::trUtf8(const char* s, const char* c, int n).

pub unsafe fn validate(
    &self,
    input: impl CastInto<MutRef<QString>>,
    pos: impl CastInto<MutRef<c_int>>
) -> State
[src]

Reimplemented from QAbstractSpinBox::validate().

Calls C++ function: virtual QValidator::State QDoubleSpinBox::validate(QString& input, int& pos) const.

C++ documentation:

Reimplemented from QAbstractSpinBox::validate().

pub unsafe fn value(&self) -> c_double[src]

This property holds the value of the spin box

Calls C++ function: double QDoubleSpinBox::value() const.

C++ documentation:

This property holds the value of the spin box

setValue() will emit valueChanged() if the new value is different 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 current setting of decimals.

Access functions:

double value() const
void setValue(double val)

Notifier signal:

void valueChanged(double d)
void valueChanged(const QString &text)

See also decimals.

pub unsafe fn value_from_text(
    &self,
    text: impl CastInto<Ref<QString>>
) -> c_double
[src]

This virtual function is used by the spin box whenever it needs to interpret text entered by the user as a value.

Calls C++ function: virtual double QDoubleSpinBox::valueFromText(const QString& text) const.

C++ documentation:

This virtual function is used by the spin box whenever it needs to interpret text entered by the user as a value.

Subclasses that need to display spin box values in a non-numeric way need to reimplement this function.

Note: QDoubleSpinBox handles specialValueText() separately; this function is only concerned with the other values.

See also textFromValue() and validate().

Methods from Deref<Target = QAbstractSpinBox>

pub fn slot_step_up(&self) -> Receiver<()>[src]

Steps up by one linestep Calling this slot is analogous to calling stepBy(1);

Returns a built-in Qt slot QAbstractSpinBox::stepUp that can be passed to qt_core::Signal::connect.

C++ documentation:

Steps up by one linestep Calling this slot is analogous to calling stepBy(1);

See also stepBy() and stepDown().

pub fn slot_step_down(&self) -> Receiver<()>[src]

Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);

Returns a built-in Qt slot QAbstractSpinBox::stepDown that can be passed to qt_core::Signal::connect.

C++ documentation:

Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);

See also stepBy() and stepUp().

pub fn slot_select_all(&self) -> Receiver<()>[src]

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

Returns a built-in Qt slot QAbstractSpinBox::selectAll that can be passed to qt_core::Signal::connect.

C++ documentation:

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

pub fn slot_clear(&self) -> Receiver<()>[src]

Clears the lineedit of all text but prefix and suffix.

Returns a built-in Qt slot QAbstractSpinBox::clear that can be passed to qt_core::Signal::connect.

C++ documentation:

Clears the lineedit of all text but prefix and suffix.

pub fn editing_finished(&self) -> Signal<()>[src]

This signal is emitted editing is finished. This happens when the spinbox loses focus and when enter is pressed.

Returns a built-in Qt signal QAbstractSpinBox::editingFinished that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted editing is finished. This happens when the spinbox loses focus and when enter is pressed.

pub unsafe fn alignment(&self) -> QFlags<AlignmentFlag>[src]

This property holds the alignment of the spin box

Calls C++ function: QFlags<Qt::AlignmentFlag> QAbstractSpinBox::alignment() const.

C++ documentation:

This property holds the alignment of the spin box

Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.

By default, the alignment is Qt::AlignLeft

Attempting to set the alignment to an illegal flag combination does nothing.

Access functions:

Qt::Alignment alignment() const
void setAlignment(Qt::Alignment flag)

See also Qt::Alignment.

pub unsafe fn button_symbols(&self) -> ButtonSymbols[src]

This property holds the current button symbol mode

Calls C++ function: QAbstractSpinBox::ButtonSymbols QAbstractSpinBox::buttonSymbols() const.

C++ documentation:

This property holds the current button symbol mode

The possible values can be either UpDownArrows or PlusMinus. The default is UpDownArrows.

Note that some styles might render PlusMinus and UpDownArrows identically.

Access functions:

ButtonSymbols buttonSymbols() const
void setButtonSymbols(ButtonSymbols bs)

See also ButtonSymbols.

pub unsafe fn clear(&mut self)[src]

Clears the lineedit of all text but prefix and suffix.

Calls C++ function: virtual [slot] void QAbstractSpinBox::clear().

C++ documentation:

Clears the lineedit of all text but prefix and suffix.

pub unsafe fn correction_mode(&self) -> CorrectionMode[src]

This property holds the mode to correct an Intermediate value if editing finishes

Calls C++ function: QAbstractSpinBox::CorrectionMode QAbstractSpinBox::correctionMode() const.

C++ documentation:

This property holds the mode to correct an Intermediate value if editing finishes

The default mode is QAbstractSpinBox::CorrectToPreviousValue.

This property was introduced in Qt 4.2.

Access functions:

CorrectionMode correctionMode() const
void setCorrectionMode(CorrectionMode cm)

See also acceptableInput, validate(), and fixup().

pub unsafe fn event(&mut self, event: impl CastInto<MutPtr<QEvent>>) -> bool[src]

Reimplemented from QObject::event().

Calls C++ function: virtual bool QAbstractSpinBox::event(QEvent* event).

C++ documentation:

Reimplemented from QObject::event().

pub unsafe fn fixup(&self, input: impl CastInto<MutRef<QString>>)[src]

This virtual function is called by the QAbstractSpinBox if the input is not validated to QValidator::Acceptable when Return is pressed or interpretText() is called. It will try to change the text so it is valid. Reimplemented in the various subclasses.

Calls C++ function: virtual void QAbstractSpinBox::fixup(QString& input) const.

C++ documentation:

This virtual function is called by the QAbstractSpinBox if the input is not validated to QValidator::Acceptable when Return is pressed or interpretText() is called. It will try to change the text so it is valid. Reimplemented in the various subclasses.

pub unsafe fn has_acceptable_input(&self) -> bool[src]

This property holds whether the input satisfies the current validation

Calls C++ function: bool QAbstractSpinBox::hasAcceptableInput() const.

C++ documentation:

This property holds whether the input satisfies the current validation

This property was introduced in Qt 4.2.

Access functions:

bool hasAcceptableInput() const

See also validate(), fixup(), and correctionMode.

pub unsafe fn has_frame(&self) -> bool[src]

This property holds whether the spin box draws itself with a frame

Calls C++ function: bool QAbstractSpinBox::hasFrame() const.

C++ documentation:

This property holds whether the spin box draws itself with a frame

If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.

Access functions:

bool hasFrame() const
void setFrame(bool)

pub unsafe fn input_method_query(
    &self,
    arg1: InputMethodQuery
) -> CppBox<QVariant>
[src]

Reimplemented from QWidget::inputMethodQuery().

Calls C++ function: virtual QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery arg1) const.

C++ documentation:

Reimplemented from QWidget::inputMethodQuery().

pub unsafe fn interpret_text(&mut self)[src]

This function interprets the text of the spin box. If the value has changed since last interpretation it will emit signals.

Calls C++ function: void QAbstractSpinBox::interpretText().

C++ documentation:

This function interprets the text of the spin box. If the value has changed since last interpretation it will emit signals.

pub unsafe fn is_accelerated(&self) -> bool[src]

This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.

Calls C++ function: bool QAbstractSpinBox::isAccelerated() const.

C++ documentation:

This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.

If enabled the spin box will increase/decrease the value faster the longer you hold the button down.

This property was introduced in Qt 4.2.

Access functions:

bool isAccelerated() const
void setAccelerated(bool on)

pub unsafe fn is_group_separator_shown(&self) -> bool[src]

This property holds whether a thousands separator is enabled. By default this property is false.

Calls C++ function: bool QAbstractSpinBox::isGroupSeparatorShown() const.

C++ documentation:

This property holds whether a thousands separator is enabled. By default this property is false.

This property was introduced in Qt 5.3.

Access functions:

bool isGroupSeparatorShown() const
void setGroupSeparatorShown(bool shown)

pub unsafe fn is_read_only(&self) -> bool[src]

This property holds whether the spin box is read only.

Calls C++ function: bool QAbstractSpinBox::isReadOnly() const.

C++ documentation:

This property holds whether the spin box is read only.

In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.

The QLineEdit in the QAbstractSpinBox does not show a cursor in read-only mode.

Access functions:

bool isReadOnly() const
void setReadOnly(bool r)

See also QLineEdit::readOnly.

pub unsafe fn keyboard_tracking(&self) -> bool[src]

This property holds whether keyboard tracking is enabled for the spinbox.

Calls C++ function: bool QAbstractSpinBox::keyboardTracking() const.

C++ documentation:

This property holds whether keyboard tracking is enabled for the spinbox.

If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.

E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.

If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.

This property was introduced in Qt 4.3.

Access functions:

bool keyboardTracking() const
void setKeyboardTracking(bool kt)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QAbstractSpinBox::metaObject() const.

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QAbstractSpinBox::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QAbstractSpinBox::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QAbstractSpinBox::qt_metacast(const char* arg1).

pub unsafe fn select_all(&mut self)[src]

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

Calls C++ function: [slot] void QAbstractSpinBox::selectAll().

C++ documentation:

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

pub unsafe fn set_accelerated(&mut self, on: bool)[src]

This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.

Calls C++ function: void QAbstractSpinBox::setAccelerated(bool on).

C++ documentation:

This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.

If enabled the spin box will increase/decrease the value faster the longer you hold the button down.

This property was introduced in Qt 4.2.

Access functions:

bool isAccelerated() const
void setAccelerated(bool on)

pub unsafe fn set_alignment(&mut self, flag: QFlags<AlignmentFlag>)[src]

This property holds the alignment of the spin box

Calls C++ function: void QAbstractSpinBox::setAlignment(QFlags<Qt::AlignmentFlag> flag).

C++ documentation:

This property holds the alignment of the spin box

Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.

By default, the alignment is Qt::AlignLeft

Attempting to set the alignment to an illegal flag combination does nothing.

Access functions:

Qt::Alignment alignment() const
void setAlignment(Qt::Alignment flag)

See also Qt::Alignment.

pub unsafe fn set_button_symbols(&mut self, bs: ButtonSymbols)[src]

This property holds the current button symbol mode

Calls C++ function: void QAbstractSpinBox::setButtonSymbols(QAbstractSpinBox::ButtonSymbols bs).

C++ documentation:

This property holds the current button symbol mode

The possible values can be either UpDownArrows or PlusMinus. The default is UpDownArrows.

Note that some styles might render PlusMinus and UpDownArrows identically.

Access functions:

ButtonSymbols buttonSymbols() const
void setButtonSymbols(ButtonSymbols bs)

See also ButtonSymbols.

pub unsafe fn set_correction_mode(&mut self, cm: CorrectionMode)[src]

This property holds the mode to correct an Intermediate value if editing finishes

Calls C++ function: void QAbstractSpinBox::setCorrectionMode(QAbstractSpinBox::CorrectionMode cm).

C++ documentation:

This property holds the mode to correct an Intermediate value if editing finishes

The default mode is QAbstractSpinBox::CorrectToPreviousValue.

This property was introduced in Qt 4.2.

Access functions:

CorrectionMode correctionMode() const
void setCorrectionMode(CorrectionMode cm)

See also acceptableInput, validate(), and fixup().

pub unsafe fn set_frame(&mut self, arg1: bool)[src]

This property holds whether the spin box draws itself with a frame

Calls C++ function: void QAbstractSpinBox::setFrame(bool arg1).

C++ documentation:

This property holds whether the spin box draws itself with a frame

If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.

Access functions:

bool hasFrame() const
void setFrame(bool)

pub unsafe fn set_group_separator_shown(&mut self, shown: bool)[src]

This property holds whether a thousands separator is enabled. By default this property is false.

Calls C++ function: void QAbstractSpinBox::setGroupSeparatorShown(bool shown).

C++ documentation:

This property holds whether a thousands separator is enabled. By default this property is false.

This property was introduced in Qt 5.3.

Access functions:

bool isGroupSeparatorShown() const
void setGroupSeparatorShown(bool shown)

pub unsafe fn set_keyboard_tracking(&mut self, kt: bool)[src]

This property holds whether keyboard tracking is enabled for the spinbox.

Calls C++ function: void QAbstractSpinBox::setKeyboardTracking(bool kt).

C++ documentation:

This property holds whether keyboard tracking is enabled for the spinbox.

If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.

E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.

If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.

This property was introduced in Qt 4.3.

Access functions:

bool keyboardTracking() const
void setKeyboardTracking(bool kt)

pub unsafe fn set_read_only(&mut self, r: bool)[src]

This property holds whether the spin box is read only.

Calls C++ function: void QAbstractSpinBox::setReadOnly(bool r).

C++ documentation:

This property holds whether the spin box is read only.

In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.

The QLineEdit in the QAbstractSpinBox does not show a cursor in read-only mode.

Access functions:

bool isReadOnly() const
void setReadOnly(bool r)

See also QLineEdit::readOnly.

pub unsafe fn set_special_value_text(
    &mut self,
    txt: impl CastInto<Ref<QString>>
)
[src]

This property holds the special-value text

Calls C++ function: void QAbstractSpinBox::setSpecialValueText(const QString& txt).

C++ documentation:

This property holds the special-value text

If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.

For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:

QSpinBox *zoomSpinBox = new QSpinBox; zoomSpinBox->setRange(0, 1000); zoomSpinBox->setSingleStep(10); zoomSpinBox->setSuffix("%"); zoomSpinBox->setSpecialValueText(tr("Automatic")); zoomSpinBox->setValue(100);

The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.

All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a QString.

To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.

If no special-value text is set, specialValueText() returns an empty string.

Access functions:

QString specialValueText() const
void setSpecialValueText(const QString &txt)

pub unsafe fn set_wrapping(&mut self, w: bool)[src]

This property holds whether the spin box is circular.

Calls C++ function: void QAbstractSpinBox::setWrapping(bool w).

C++ documentation:

This property holds whether the spin box is circular.

If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.

QSpinBox *spinBox = new QSpinBox(this); spinBox->setRange(0, 100); spinBox->setWrapping(true); spinBox->setValue(100); spinBox->stepBy(1); // value is 0

Access functions:

bool wrapping() const
void setWrapping(bool w)

See also QSpinBox::minimum() and QSpinBox::maximum().

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QAbstractSpinBox::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

pub unsafe fn special_value_text(&self) -> CppBox<QString>[src]

This property holds the special-value text

Calls C++ function: QString QAbstractSpinBox::specialValueText() const.

C++ documentation:

This property holds the special-value text

If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.

For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:

QSpinBox *zoomSpinBox = new QSpinBox; zoomSpinBox->setRange(0, 1000); zoomSpinBox->setSingleStep(10); zoomSpinBox->setSuffix("%"); zoomSpinBox->setSpecialValueText(tr("Automatic")); zoomSpinBox->setValue(100);

The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.

All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a QString.

To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.

If no special-value text is set, specialValueText() returns an empty string.

Access functions:

QString specialValueText() const
void setSpecialValueText(const QString &txt)

pub unsafe fn step_by(&mut self, steps: c_int)[src]

Virtual function that is called whenever the user triggers a step. The steps parameter indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to stepBy(-1), whereas pressing Qt::Key_Prior will trigger a call to stepBy(10).

Calls C++ function: virtual void QAbstractSpinBox::stepBy(int steps).

C++ documentation:

Virtual function that is called whenever the user triggers a step. The steps parameter indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to stepBy(-1), whereas pressing Qt::Key_Prior will trigger a call to stepBy(10).

If you subclass QAbstractSpinBox you must reimplement this function. Note that this function is called even if the resulting value will be outside the bounds of minimum and maximum. It's this function's job to handle these situations.

pub unsafe fn step_down(&mut self)[src]

Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);

Calls C++ function: [slot] void QAbstractSpinBox::stepDown().

C++ documentation:

Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);

See also stepBy() and stepUp().

pub unsafe fn step_up(&mut self)[src]

Steps up by one linestep Calling this slot is analogous to calling stepBy(1);

Calls C++ function: [slot] void QAbstractSpinBox::stepUp().

C++ documentation:

Steps up by one linestep Calling this slot is analogous to calling stepBy(1);

See also stepBy() and stepDown().

pub unsafe fn text(&self) -> CppBox<QString>[src]

This property holds the spin box's text, including any prefix and suffix

Calls C++ function: QString QAbstractSpinBox::text() const.

C++ documentation:

This property holds the spin box's text, including any prefix and suffix

There is no default text.

Access functions:

QString text() const

pub unsafe fn validate(
    &self,
    input: impl CastInto<MutRef<QString>>,
    pos: impl CastInto<MutRef<c_int>>
) -> State
[src]

This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter indicates the position in the string. Reimplemented in the various subclasses.

Calls C++ function: virtual QValidator::State QAbstractSpinBox::validate(QString& input, int& pos) const.

C++ documentation:

This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter indicates the position in the string. Reimplemented in the various subclasses.

pub unsafe fn wrapping(&self) -> bool[src]

This property holds whether the spin box is circular.

Calls C++ function: bool QAbstractSpinBox::wrapping() const.

C++ documentation:

This property holds whether the spin box is circular.

If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.

QSpinBox *spinBox = new QSpinBox(this); spinBox->setRange(0, 100); spinBox->setWrapping(true); spinBox->setValue(100); spinBox->stepBy(1); // value is 0

Access functions:

bool wrapping() const
void setWrapping(bool w)

See also QSpinBox::minimum() and QSpinBox::maximum().

Trait Implementations

impl CppDeletable for QDoubleSpinBox[src]

unsafe fn delete(&mut self)[src]

Destructor.

Calls C++ function: virtual [destructor] void QDoubleSpinBox::~QDoubleSpinBox().

C++ documentation:

Destructor.

impl Deref for QDoubleSpinBox[src]

type Target = QAbstractSpinBox

The resulting type after dereferencing.

fn deref(&self) -> &QAbstractSpinBox[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDoubleSpinBox* ptr).

impl DerefMut for QDoubleSpinBox[src]

fn deref_mut(&mut self) -> &mut QAbstractSpinBox[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDoubleSpinBox* ptr).

impl DynamicCast<QDoubleSpinBox> for QAbstractSpinBox[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QAbstractSpinBox* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractSpinBox>
) -> MutPtr<QDoubleSpinBox>
[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QAbstractSpinBox* ptr).

impl DynamicCast<QDoubleSpinBox> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QWidget* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QWidget* ptr).

impl DynamicCast<QDoubleSpinBox> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QObject* ptr).

impl DynamicCast<QDoubleSpinBox> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QPaintDevice* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* dynamic_cast<QDoubleSpinBox*>(QPaintDevice* ptr).

impl StaticDowncast<QDoubleSpinBox> for QAbstractSpinBox[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QAbstractSpinBox* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractSpinBox>
) -> MutPtr<QDoubleSpinBox>
[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QAbstractSpinBox* ptr).

impl StaticDowncast<QDoubleSpinBox> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QWidget* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QWidget* ptr).

impl StaticDowncast<QDoubleSpinBox> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QObject* ptr).

impl StaticDowncast<QDoubleSpinBox> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QDoubleSpinBox>[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QPaintDevice* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QPaintDevice>
) -> MutPtr<QDoubleSpinBox>
[src]

Calls C++ function: QDoubleSpinBox* static_cast<QDoubleSpinBox*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractSpinBox> for QDoubleSpinBox[src]

unsafe fn static_upcast(ptr: Ptr<QDoubleSpinBox>) -> Ptr<QAbstractSpinBox>[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDoubleSpinBox* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QDoubleSpinBox>
) -> MutPtr<QAbstractSpinBox>
[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDoubleSpinBox* ptr).

impl StaticUpcast<QObject> for QDoubleSpinBox[src]

unsafe fn static_upcast(ptr: Ptr<QDoubleSpinBox>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QDoubleSpinBox* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDoubleSpinBox>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QDoubleSpinBox* ptr).

impl StaticUpcast<QPaintDevice> for QDoubleSpinBox[src]

unsafe fn static_upcast(ptr: Ptr<QDoubleSpinBox>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDoubleSpinBox* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDoubleSpinBox>) -> MutPtr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDoubleSpinBox* ptr).

impl StaticUpcast<QWidget> for QDoubleSpinBox[src]

unsafe fn static_upcast(ptr: Ptr<QDoubleSpinBox>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QDoubleSpinBox* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDoubleSpinBox>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QDoubleSpinBox* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.