[][src]Struct qt_widgets::QInputDialog

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

The QInputDialog class provides a simple convenience dialog to get a single value from the user.

C++ class: QInputDialog.

C++ documentation:

The QInputDialog class provides a simple convenience dialog to get a single value from the user.

The input value can be a string, a number or an item from a list. A label must be set to tell the user what they should enter.

Five static convenience functions are provided: getText(), getMultiLineText(), getInt(), getDouble(), and getItem(). All the functions can be used in a similar way, for example:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

The ok variable is set to true if the user clicks OK; otherwise, it is set to false.

Input Dialogs

The Standard Dialogs example shows how to use QInputDialog as well as other built-in Qt dialogs.

Methods

impl QInputDialog[src]

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

This signal is emitted whenever the text string changes in the dialog. The current string is specified by text.

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

C++ documentation:

This signal is emitted whenever the text string changes in the dialog. The current string is specified by text.

This signal is only relevant when the input dialog is used in TextInput mode.

Note: Notifier signal for property textValue.

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

This signal is emitted whenever the user selects a text string by accepting the dialog; for example, by clicking the OK button. The selected string is specified by text.

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

C++ documentation:

This signal is emitted whenever the user selects a text string by accepting the dialog; for example, by clicking the OK button. The selected string is specified by text.

This signal is only relevant when the input dialog is used in TextInput mode.

pub fn int_value_changed(&self) -> Signal<(c_int,)>[src]

This signal is emitted whenever the integer value changes in the dialog. The current value is specified by value.

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

C++ documentation:

This signal is emitted whenever the integer value changes in the dialog. The current value is specified by value.

This signal is only relevant when the input dialog is used in IntInput mode.

Note: Notifier signal for property intValue.

pub fn int_value_selected(&self) -> Signal<(c_int,)>[src]

This signal is emitted whenever the user selects a integer value by accepting the dialog; for example, by clicking the OK button. The selected value is specified by value.

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

C++ documentation:

This signal is emitted whenever the user selects a integer value by accepting the dialog; for example, by clicking the OK button. The selected value is specified by value.

This signal is only relevant when the input dialog is used in IntInput mode.

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

This signal is emitted whenever the double value changes in the dialog. The current value is specified by value.

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

C++ documentation:

This signal is emitted whenever the double value changes in the dialog. The current value is specified by value.

This signal is only relevant when the input dialog is used in DoubleInput mode.

Note: Notifier signal for property doubleValue.

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

This signal is emitted whenever the user selects a double value by accepting the dialog; for example, by clicking the OK button. The selected value is specified by value.

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

C++ documentation:

This signal is emitted whenever the user selects a double value by accepting the dialog; for example, by clicking the OK button. The selected value is specified by value.

This signal is only relevant when the input dialog is used in DoubleInput mode.

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

This property holds the text for the button used to cancel the dialog

Calls C++ function: QString QInputDialog::cancelButtonText() const.

C++ documentation:

This property holds the text for the button used to cancel the dialog

This property was introduced in Qt 4.5.

Access functions:

QString cancelButtonText() const
void setCancelButtonText(const QString &text)

pub unsafe fn combo_box_items(&self) -> CppBox<QStringList>[src]

This property holds the items used in the combo box for the input dialog

Calls C++ function: QStringList QInputDialog::comboBoxItems() const.

C++ documentation:

This property holds the items used in the combo box for the input dialog

This property was introduced in Qt 4.5.

Access functions:

QStringList comboBoxItems() const
void setComboBoxItems(const QStringList &items)

pub unsafe fn done(&self, result: c_int)[src]

Reimplemented from QDialog::done().

Calls C++ function: virtual void QInputDialog::done(int result).

C++ documentation:

Reimplemented from QDialog::done().

Closes the dialog and sets its result code to result. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return result.

See also QDialog::done().

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

sets the precision of the double spinbox in decimals

Calls C++ function: int QInputDialog::doubleDecimals() const.

C++ documentation:

sets the precision of the double spinbox in decimals

This property was introduced in Qt 4.5.

Access functions:

int doubleDecimals() const
void setDoubleDecimals(int decimals)

See also QDoubleSpinBox::setDecimals().

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

This property holds the maximum double precision floating point value accepted as input

Calls C++ function: double QInputDialog::doubleMaximum() const.

C++ documentation:

This property holds the maximum double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleMaximum() const
void setDoubleMaximum(double max)

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

This property holds the minimum double precision floating point value accepted as input

Calls C++ function: double QInputDialog::doubleMinimum() const.

C++ documentation:

This property holds the minimum double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleMinimum() const
void setDoubleMinimum(double min)

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

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

This property holds the step by which the double value is increased and decreased

Calls C++ function: double QInputDialog::doubleStep() const.

C++ documentation:

This property holds the step by which the double value is increased and decreased

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 5.10.

Access functions:

double doubleStep() const
void setDoubleStep(double step)

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

This property holds the current double precision floating point value accepted as input

Calls C++ function: double QInputDialog::doubleValue() const.

C++ documentation:

This property holds the current double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleValue() const
void setDoubleValue(double value)

Notifier signal:

void doubleValueChanged(double value)

pub unsafe fn get_double_9a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double,
    max_value: c_double,
    decimals: c_int,
    ok: *mut bool,
    flags: QFlags<WindowType>
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …, double minValue = …, double maxValue = …, int decimals = …, bool* ok = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_8a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double,
    max_value: c_double,
    decimals: c_int,
    ok: *mut bool
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …, double minValue = …, double maxValue = …, int decimals = …, bool* ok = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double,
    max_value: c_double,
    decimals: c_int
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …, double minValue = …, double maxValue = …, int decimals = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double,
    max_value: c_double
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …, double minValue = …, double maxValue = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …, double minValue = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value = …).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>
) -> c_double
[src]

Static convenience function to get a floating point number from the user.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label).

C++ documentation:

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_double_10a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_double,
    min_value: c_double,
    max_value: c_double,
    decimals: c_int,
    ok: *mut bool,
    flags: QFlags<WindowType>,
    step: c_double
) -> c_double
[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: static double QInputDialog::getDouble(QWidget* parent, const QString& title, const QString& label, double value, double minValue, double maxValue, int decimals, bool* ok, QFlags<Qt::WindowType> flags, double step).

C++ documentation:

This is an overloaded function.

Static convenience function to get a floating point number from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default floating point number that the line edit will be set to. min and max are the minimum and maximum values the user may choose. decimals is the maximum number of decimal places the number may have. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull, *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the floating point number which has been entered by the user.

Use this static function like this:

bool ok; double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, &ok); if (ok) doubleLabel->setText(QString("$%1").arg(d));

See also getText(), getInt(), getItem(), and getMultiLineText().

pub unsafe fn get_int_9a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int,
    min_value: c_int,
    max_value: c_int,
    step: c_int,
    ok: *mut bool,
    flags: QFlags<WindowType>
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …, int minValue = …, int maxValue = …, int step = …, bool* ok = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_8a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int,
    min_value: c_int,
    max_value: c_int,
    step: c_int,
    ok: *mut bool
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …, int minValue = …, int maxValue = …, int step = …, bool* ok = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int,
    min_value: c_int,
    max_value: c_int,
    step: c_int
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …, int minValue = …, int maxValue = …, int step = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int,
    min_value: c_int,
    max_value: c_int
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …, int minValue = …, int maxValue = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int,
    min_value: c_int
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …, int minValue = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    value: c_int
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label, int value = …).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_int_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>
) -> c_int
[src]

Static convenience function to get an integer input from the user.

Calls C++ function: static int QInputDialog::getInt(QWidget* parent, const QString& title, const QString& label).

C++ documentation:

Static convenience function to get an integer input from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). value is the default integer which the spinbox will be set to. min and max are the minimum and maximum values the user may choose. step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.

If ok is nonnull *ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

On success, this function returns the integer which has been entered by the user; on failure, it returns the initial value.

Use this static function like this:

bool ok; int i = QInputDialog::getInt(this, tr("QInputDialog::getInteger()"), tr("Percentage:"), 25, 0, 100, 1, &ok); if (ok) integerLabel->setText(tr("%1%").arg(i));

This function was introduced in Qt 4.5.

See also getText(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_item_9a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>,
    current: c_int,
    editable: bool,
    ok: *mut bool,
    flags: QFlags<WindowType>,
    input_method_hints: QFlags<InputMethodHint>
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items, int current = …, bool editable = …, bool* ok = …, QFlags<Qt::WindowType> flags = …, QFlags<Qt::InputMethodHint> inputMethodHints = …).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_item_8a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>,
    current: c_int,
    editable: bool,
    ok: *mut bool,
    flags: QFlags<WindowType>
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items, int current = …, bool editable = …, bool* ok = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_item_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>,
    current: c_int,
    editable: bool,
    ok: *mut bool
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items, int current = …, bool editable = …, bool* ok = …).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_item_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>,
    current: c_int,
    editable: bool
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items, int current = …, bool editable = …).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_item_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>,
    current: c_int
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items, int current = …).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_item_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    items: impl CastInto<Ref<QStringList>>
) -> CppBox<QString>
[src]

Static convenience function to let the user select an item from a string list.

Calls C++ function: static QString QInputDialog::getItem(QWidget* parent, const QString& title, const QString& label, const QStringList& items).

C++ documentation:

Static convenience function to let the user select an item from a string list.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). items is the string list which is inserted into the combo box. current is the number of the item which should be the current item. inputMethodHints is the input method hints that will be used if the combo box is editable and an input method is active.

If editable is true the user can enter their own text; otherwise, the user may only select one of the existing items.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the widget flags.

This function returns the text of the current item, or if editable is true, the current text of the combo box.

Use this static function like this:

QStringList items; items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");

bool ok; QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"), tr("Season:"), items, 0, false, &ok); if (ok && !item.isEmpty()) itemLabel->setText(item);

See also getText(), getInt(), getDouble(), and getMultiLineText().

pub unsafe fn get_multi_line_text_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool,
    flags: QFlags<WindowType>,
    input_method_hints: QFlags<InputMethodHint>
) -> CppBox<QString>
[src]

Static convenience function to get a multiline string from the user.

Calls C++ function: static QString QInputDialog::getMultiLineText(QWidget* parent, const QString& title, const QString& label, const QString& text = …, bool* ok = …, QFlags<Qt::WindowType> flags = …, QFlags<Qt::InputMethodHint> inputMethodHints = …).

C++ documentation:

Static convenience function to get a multiline string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's plain text edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"), tr("Address:"), "John Doe\nFreedom Street", &ok); if (ok && !text.isEmpty()) multiLineTextLabel->setText(text);

This function was introduced in Qt 5.2.

See also getInt(), getDouble(), getItem(), and getText().

pub unsafe fn get_multi_line_text_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool,
    flags: QFlags<WindowType>
) -> CppBox<QString>
[src]

Static convenience function to get a multiline string from the user.

Calls C++ function: static QString QInputDialog::getMultiLineText(QWidget* parent, const QString& title, const QString& label, const QString& text = …, bool* ok = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Static convenience function to get a multiline string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's plain text edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"), tr("Address:"), "John Doe\nFreedom Street", &ok); if (ok && !text.isEmpty()) multiLineTextLabel->setText(text);

This function was introduced in Qt 5.2.

See also getInt(), getDouble(), getItem(), and getText().

pub unsafe fn get_multi_line_text_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool
) -> CppBox<QString>
[src]

Static convenience function to get a multiline string from the user.

Calls C++ function: static QString QInputDialog::getMultiLineText(QWidget* parent, const QString& title, const QString& label, const QString& text = …, bool* ok = …).

C++ documentation:

Static convenience function to get a multiline string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's plain text edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"), tr("Address:"), "John Doe\nFreedom Street", &ok); if (ok && !text.isEmpty()) multiLineTextLabel->setText(text);

This function was introduced in Qt 5.2.

See also getInt(), getDouble(), getItem(), and getText().

pub unsafe fn get_multi_line_text_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Static convenience function to get a multiline string from the user.

Calls C++ function: static QString QInputDialog::getMultiLineText(QWidget* parent, const QString& title, const QString& label, const QString& text = …).

C++ documentation:

Static convenience function to get a multiline string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's plain text edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"), tr("Address:"), "John Doe\nFreedom Street", &ok); if (ok && !text.isEmpty()) multiLineTextLabel->setText(text);

This function was introduced in Qt 5.2.

See also getInt(), getDouble(), getItem(), and getText().

pub unsafe fn get_multi_line_text_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Static convenience function to get a multiline string from the user.

Calls C++ function: static QString QInputDialog::getMultiLineText(QWidget* parent, const QString& title, const QString& label).

C++ documentation:

Static convenience function to get a multiline string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's plain text edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"), tr("Address:"), "John Doe\nFreedom Street", &ok); if (ok && !text.isEmpty()) multiLineTextLabel->setText(text);

This function was introduced in Qt 5.2.

See also getInt(), getDouble(), getItem(), and getText().

pub unsafe fn get_text_8a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    echo: EchoMode,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool,
    flags: QFlags<WindowType>,
    input_method_hints: QFlags<InputMethodHint>
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label, QLineEdit::EchoMode echo = …, const QString& text = …, bool* ok = …, QFlags<Qt::WindowType> flags = …, QFlags<Qt::InputMethodHint> inputMethodHints = …).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_text_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    echo: EchoMode,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool,
    flags: QFlags<WindowType>
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label, QLineEdit::EchoMode echo = …, const QString& text = …, bool* ok = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_text_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    echo: EchoMode,
    text: impl CastInto<Ref<QString>>,
    ok: *mut bool
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label, QLineEdit::EchoMode echo = …, const QString& text = …, bool* ok = …).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_text_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    echo: EchoMode,
    text: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label, QLineEdit::EchoMode echo = …, const QString& text = …).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_text_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>,
    echo: EchoMode
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label, QLineEdit::EchoMode echo = …).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn get_text_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    label: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Static convenience function to get a string from the user.

Calls C++ function: static QString QInputDialog::getText(QWidget* parent, const QString& title, const QString& label).

C++ documentation:

Static convenience function to get a string from the user.

title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the line edit. mode is the echo mode the line edit will use. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.

If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel. The dialog's parent is parent. The dialog will be modal and uses the specified widget flags.

If the dialog is accepted, this function returns the text in the dialog's line edit. If the dialog is rejected, a null QString is returned.

Use this static function like this:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

See also getInt(), getDouble(), getItem(), and getMultiLineText().

pub unsafe fn input_mode(&self) -> InputMode[src]

This property holds the mode used for input

Calls C++ function: QInputDialog::InputMode QInputDialog::inputMode() const.

C++ documentation:

This property holds the mode used for input

This property helps determine which widget is used for entering input into the dialog.

This property was introduced in Qt 4.5.

Access functions:

InputMode inputMode() const
void setInputMode(InputMode mode)

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

This property holds the maximum integer value accepted as input

Calls C++ function: int QInputDialog::intMaximum() const.

C++ documentation:

This property holds the maximum integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intMaximum() const
void setIntMaximum(int max)

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

This property holds the minimum integer value accepted as input

Calls C++ function: int QInputDialog::intMinimum() const.

C++ documentation:

This property holds the minimum integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intMinimum() const
void setIntMinimum(int min)

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

This property holds the step by which the integer value is increased and decreased

Calls C++ function: int QInputDialog::intStep() const.

C++ documentation:

This property holds the step by which the integer value is increased and decreased

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intStep() const
void setIntStep(int step)

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

This property holds the current integer value accepted as input

Calls C++ function: int QInputDialog::intValue() const.

C++ documentation:

This property holds the current integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intValue() const
void setIntValue(int value)

Notifier signal:

void intValueChanged(int value)

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

This property holds whether or not the combo box used in the input dialog is editable

Calls C++ function: bool QInputDialog::isComboBoxEditable() const.

C++ documentation:

This property holds whether or not the combo box used in the input dialog is editable

This property was introduced in Qt 4.5.

Access functions:

bool isComboBoxEditable() const
void setComboBoxEditable(bool editable)

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

This property holds the label's text which describes what needs to be input

Calls C++ function: QString QInputDialog::labelText() const.

C++ documentation:

This property holds the label's text which describes what needs to be input

This property was introduced in Qt 4.5.

Access functions:

QString labelText() const
void setLabelText(const QString &text)

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

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

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

Reimplemented from QWidget::minimumSizeHint().

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

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn new_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    flags: QFlags<WindowType>
) -> QBox<QInputDialog>
[src]

Constructs a new input dialog with the given parent and window flags.

Calls C++ function: [constructor] void QInputDialog::QInputDialog(QWidget* parent = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Constructs a new input dialog with the given parent and window flags.

This function was introduced in Qt 4.5.

pub unsafe fn new_0a() -> QBox<QInputDialog>[src]

The QInputDialog class provides a simple convenience dialog to get a single value from the user.

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

C++ documentation:

The QInputDialog class provides a simple convenience dialog to get a single value from the user.

The input value can be a string, a number or an item from a list. A label must be set to tell the user what they should enter.

Five static convenience functions are provided: getText(), getMultiLineText(), getInt(), getDouble(), and getItem(). All the functions can be used in a similar way, for example:

bool ok; QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"), tr("User name:"), QLineEdit::Normal, QDir::home().dirName(), &ok); if (ok && !text.isEmpty()) textLabel->setText(text);

The ok variable is set to true if the user clicks OK; otherwise, it is set to false.

Input Dialogs

The Standard Dialogs example shows how to use QInputDialog as well as other built-in Qt dialogs.

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QWidget>>) -> QBox<QInputDialog>[src]

Constructs a new input dialog with the given parent and window flags.

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

C++ documentation:

Constructs a new input dialog with the given parent and window flags.

This function was introduced in Qt 4.5.

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

This property holds the text for the button used to accept the entry in the dialog

Calls C++ function: QString QInputDialog::okButtonText() const.

C++ documentation:

This property holds the text for the button used to accept the entry in the dialog

This property was introduced in Qt 4.5.

Access functions:

QString okButtonText() const
void setOkButtonText(const QString &text)

pub unsafe fn open(
    &self,
    receiver: impl CastInto<Ptr<QObject>>,
    member: *const c_char
)
[src]

This function connects one of its signals to the slot specified by receiver and member. The specific signal depends on the arguments that are specified in member. These are:

Calls C++ function: void QInputDialog::open(QObject* receiver, const char* member).

C++ documentation:

This function connects one of its signals to the slot specified by receiver and member. The specific signal depends on the arguments that are specified in member. These are:

The signal will be disconnected from the slot when the dialog is closed.

This function was introduced in Qt 4.5.

pub unsafe fn options(&self) -> QFlags<InputDialogOption>[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: QFlags<QInputDialog::InputDialogOption> QInputDialog::options() const.

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

This property was introduced in Qt 4.5.

Access functions:

InputDialogOptions options() const
void setOptions(InputDialogOptions options)

See also setOption() and testOption().

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

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

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

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

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

This property holds the text for the button used to cancel the dialog

Calls C++ function: void QInputDialog::setCancelButtonText(const QString& text).

C++ documentation:

This property holds the text for the button used to cancel the dialog

This property was introduced in Qt 4.5.

Access functions:

QString cancelButtonText() const
void setCancelButtonText(const QString &text)

pub unsafe fn set_combo_box_editable(&self, editable: bool)[src]

This property holds whether or not the combo box used in the input dialog is editable

Calls C++ function: void QInputDialog::setComboBoxEditable(bool editable).

C++ documentation:

This property holds whether or not the combo box used in the input dialog is editable

This property was introduced in Qt 4.5.

Access functions:

bool isComboBoxEditable() const
void setComboBoxEditable(bool editable)

pub unsafe fn set_combo_box_items(&self, items: impl CastInto<Ref<QStringList>>)[src]

This property holds the items used in the combo box for the input dialog

Calls C++ function: void QInputDialog::setComboBoxItems(const QStringList& items).

C++ documentation:

This property holds the items used in the combo box for the input dialog

This property was introduced in Qt 4.5.

Access functions:

QStringList comboBoxItems() const
void setComboBoxItems(const QStringList &items)

pub unsafe fn set_double_decimals(&self, decimals: c_int)[src]

sets the precision of the double spinbox in decimals

Calls C++ function: void QInputDialog::setDoubleDecimals(int decimals).

C++ documentation:

sets the precision of the double spinbox in decimals

This property was introduced in Qt 4.5.

Access functions:

int doubleDecimals() const
void setDoubleDecimals(int decimals)

See also QDoubleSpinBox::setDecimals().

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

This property holds the maximum double precision floating point value accepted as input

Calls C++ function: void QInputDialog::setDoubleMaximum(double max).

C++ documentation:

This property holds the maximum double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleMaximum() const
void setDoubleMaximum(double max)

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

This property holds the minimum double precision floating point value accepted as input

Calls C++ function: void QInputDialog::setDoubleMinimum(double min).

C++ documentation:

This property holds the minimum double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleMinimum() const
void setDoubleMinimum(double min)

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

Sets the range of double precision floating point values accepted by the dialog when used in DoubleInput mode, with minimum and maximum values specified by min and max respectively.

Calls C++ function: void QInputDialog::setDoubleRange(double min, double max).

C++ documentation:

Sets the range of double precision floating point values accepted by the dialog when used in DoubleInput mode, with minimum and maximum values specified by min and max respectively.

pub unsafe fn set_double_step(&self, step: c_double)[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

This property holds the step by which the double value is increased and decreased

Calls C++ function: void QInputDialog::setDoubleStep(double step).

C++ documentation:

This property holds the step by which the double value is increased and decreased

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 5.10.

Access functions:

double doubleStep() const
void setDoubleStep(double step)

pub unsafe fn set_double_value(&self, value: c_double)[src]

This property holds the current double precision floating point value accepted as input

Calls C++ function: void QInputDialog::setDoubleValue(double value).

C++ documentation:

This property holds the current double precision floating point value accepted as input

This property is only relevant when the input dialog is used in DoubleInput mode.

This property was introduced in Qt 4.5.

Access functions:

double doubleValue() const
void setDoubleValue(double value)

Notifier signal:

void doubleValueChanged(double value)

pub unsafe fn set_input_mode(&self, mode: InputMode)[src]

This property holds the mode used for input

Calls C++ function: void QInputDialog::setInputMode(QInputDialog::InputMode mode).

C++ documentation:

This property holds the mode used for input

This property helps determine which widget is used for entering input into the dialog.

This property was introduced in Qt 4.5.

Access functions:

InputMode inputMode() const
void setInputMode(InputMode mode)

pub unsafe fn set_int_maximum(&self, max: c_int)[src]

This property holds the maximum integer value accepted as input

Calls C++ function: void QInputDialog::setIntMaximum(int max).

C++ documentation:

This property holds the maximum integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intMaximum() const
void setIntMaximum(int max)

pub unsafe fn set_int_minimum(&self, min: c_int)[src]

This property holds the minimum integer value accepted as input

Calls C++ function: void QInputDialog::setIntMinimum(int min).

C++ documentation:

This property holds the minimum integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intMinimum() const
void setIntMinimum(int min)

pub unsafe fn set_int_range(&self, min: c_int, max: c_int)[src]

Sets the range of integer values accepted by the dialog when used in IntInput mode, with minimum and maximum values specified by min and max respectively.

Calls C++ function: void QInputDialog::setIntRange(int min, int max).

C++ documentation:

Sets the range of integer values accepted by the dialog when used in IntInput mode, with minimum and maximum values specified by min and max respectively.

pub unsafe fn set_int_step(&self, step: c_int)[src]

This property holds the step by which the integer value is increased and decreased

Calls C++ function: void QInputDialog::setIntStep(int step).

C++ documentation:

This property holds the step by which the integer value is increased and decreased

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intStep() const
void setIntStep(int step)

pub unsafe fn set_int_value(&self, value: c_int)[src]

This property holds the current integer value accepted as input

Calls C++ function: void QInputDialog::setIntValue(int value).

C++ documentation:

This property holds the current integer value accepted as input

This property is only relevant when the input dialog is used in IntInput mode.

This property was introduced in Qt 4.5.

Access functions:

int intValue() const
void setIntValue(int value)

Notifier signal:

void intValueChanged(int value)

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

This property holds the label's text which describes what needs to be input

Calls C++ function: void QInputDialog::setLabelText(const QString& text).

C++ documentation:

This property holds the label's text which describes what needs to be input

This property was introduced in Qt 4.5.

Access functions:

QString labelText() const
void setLabelText(const QString &text)

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

This property holds the text for the button used to accept the entry in the dialog

Calls C++ function: void QInputDialog::setOkButtonText(const QString& text).

C++ documentation:

This property holds the text for the button used to accept the entry in the dialog

This property was introduced in Qt 4.5.

Access functions:

QString okButtonText() const
void setOkButtonText(const QString &text)

pub unsafe fn set_option_2a(&self, option: InputDialogOption, on: bool)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QInputDialog::setOption(QInputDialog::InputDialogOption option, bool on = …).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options and testOption().

pub unsafe fn set_option_1a(&self, option: InputDialogOption)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QInputDialog::setOption(QInputDialog::InputDialogOption option).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options and testOption().

pub unsafe fn set_options(&self, options: QFlags<InputDialogOption>)[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: void QInputDialog::setOptions(QFlags<QInputDialog::InputDialogOption> options).

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

This property was introduced in Qt 4.5.

Access functions:

InputDialogOptions options() const
void setOptions(InputDialogOptions options)

See also setOption() and testOption().

pub unsafe fn set_text_echo_mode(&self, mode: EchoMode)[src]

This property holds the echo mode for the text value

Calls C++ function: void QInputDialog::setTextEchoMode(QLineEdit::EchoMode mode).

C++ documentation:

This property holds the echo mode for the text value

This property is only relevant when the input dialog is used in TextInput mode.

This property was introduced in Qt 4.5.

Access functions:

QLineEdit::EchoMode textEchoMode() const
void setTextEchoMode(QLineEdit::EchoMode mode)

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

This property holds the text value for the input dialog

Calls C++ function: void QInputDialog::setTextValue(const QString& text).

C++ documentation:

This property holds the text value for the input dialog

This property is only relevant when the input dialog is used in TextInput mode.

This property was introduced in Qt 4.5.

Access functions:

QString textValue() const
void setTextValue(const QString &text)

Notifier signal:

void textValueChanged(const QString &text)

pub unsafe fn set_visible(&self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QInputDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

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

Reimplemented from QWidget::sizeHint().

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

C++ documentation:

Reimplemented from QWidget::sizeHint().

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

Returns a reference to the staticMetaObject field.

pub unsafe fn test_option(&self, option: InputDialogOption) -> bool[src]

Returns true if the given option is enabled; otherwise, returns false.

Calls C++ function: bool QInputDialog::testOption(QInputDialog::InputDialogOption option) const.

C++ documentation:

Returns true if the given option is enabled; otherwise, returns false.

See also options and setOption().

pub unsafe fn text_echo_mode(&self) -> EchoMode[src]

This property holds the echo mode for the text value

Calls C++ function: QLineEdit::EchoMode QInputDialog::textEchoMode() const.

C++ documentation:

This property holds the echo mode for the text value

This property is only relevant when the input dialog is used in TextInput mode.

This property was introduced in Qt 4.5.

Access functions:

QLineEdit::EchoMode textEchoMode() const
void setTextEchoMode(QLineEdit::EchoMode mode)

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

This property holds the text value for the input dialog

Calls C++ function: QString QInputDialog::textValue() const.

C++ documentation:

This property holds the text value for the input dialog

This property is only relevant when the input dialog is used in TextInput mode.

This property was introduced in Qt 4.5.

Access functions:

QString textValue() const
void setTextValue(const QString &text)

Notifier signal:

void textValueChanged(const QString &text)

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

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

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

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

Methods from Deref<Target = QDialog>

pub fn finished(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

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

C++ documentation:

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also accepted() and rejected().

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

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

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

C++ documentation:

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and rejected().

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

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

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

C++ documentation:

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and accepted().

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

Shows the dialog as a window modal dialog, returning immediately.

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

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

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

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

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

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub fn slot_done(&self) -> Receiver<(c_int,)>[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

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

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

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

Hides the modal dialog and sets the result code to Accepted.

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

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

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

Hides the modal dialog and sets the result code to Rejected.

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

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub fn slot_show_extension(&self) -> Receiver<(bool,)>[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

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

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn accept(&self)[src]

Hides the modal dialog and sets the result code to Accepted.

Calls C++ function: virtual [slot] void QDialog::accept().

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub unsafe fn done(&self, arg1: c_int)[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Calls C++ function: virtual [slot] void QDialog::done(int arg1).

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

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

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Calls C++ function: virtual [slot] int QDialog::exec().

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub unsafe fn extension(&self) -> QPtr<QWidget>[src]

Returns the dialog's extension or 0 if no extension has been defined.

Calls C++ function: QWidget* QDialog::extension() const.

C++ documentation:

Returns the dialog's extension or 0 if no extension has been defined.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setExtension(), showExtension(), and setOrientation().

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

This property holds whether the size grip is enabled

Calls C++ function: bool QDialog::isSizeGripEnabled() const.

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

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

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

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

Reimplemented from QWidget::minimumSizeHint().

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

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn open(&self)[src]

Shows the dialog as a window modal dialog, returning immediately.

Calls C++ function: virtual [slot] void QDialog::open().

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub unsafe fn orientation(&self) -> Orientation[src]

Returns the dialog's extension orientation.

Calls C++ function: Qt::Orientation QDialog::orientation() const.

C++ documentation:

Returns the dialog's extension orientation.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setOrientation() and extension().

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

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

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

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

pub unsafe fn reject(&self)[src]

Hides the modal dialog and sets the result code to Rejected.

Calls C++ function: virtual [slot] void QDialog::reject().

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

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

In general returns the modal dialog's result code, Accepted or Rejected.

Calls C++ function: int QDialog::result() const.

C++ documentation:

In general returns the modal dialog's result code, Accepted or Rejected.

Note: When called on a QMessageBox instance, the returned value is a value of the QMessageBox::StandardButton enum.

Do not call this function if the dialog was constructed with the Qt::WA_DeleteOnClose attribute.

See also setResult().

pub unsafe fn set_extension(&self, extension: impl CastInto<Ptr<QWidget>>)[src]

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Calls C++ function: void QDialog::setExtension(QWidget* extension).

C++ documentation:

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also extension(), showExtension(), and setOrientation().

pub unsafe fn set_modal(&self, modal: bool)[src]

This property holds whether show() should pop up the dialog as modal or modeless

Calls C++ function: void QDialog::setModal(bool modal).

C++ documentation:

This property holds whether show() should pop up the dialog as modal or modeless

By default, this property is false and show() pops up the dialog as modeless. Setting this property to true is equivalent to setting QWidget::windowModality to Qt::ApplicationModal.

exec() ignores the value of this property and always pops up the dialog as modal.

Access functions:

bool isModal() const
void setModal(bool modal)

See also QWidget::windowModality, show(), and exec().

pub unsafe fn set_orientation(&self, orientation: Orientation)[src]

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Calls C++ function: void QDialog::setOrientation(Qt::Orientation orientation).

C++ documentation:

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also orientation() and setExtension().

pub unsafe fn set_result(&self, r: c_int)[src]

Sets the modal dialog's result code to i.

Calls C++ function: void QDialog::setResult(int r).

C++ documentation:

Sets the modal dialog's result code to i.

Note: We recommend that you use one of the values defined by QDialog::DialogCode.

See also result().

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

This property holds whether the size grip is enabled

Calls C++ function: void QDialog::setSizeGripEnabled(bool arg1).

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn set_visible(&self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

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

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Calls C++ function: [slot] void QDialog::showExtension(bool arg1).

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

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

Reimplemented from QWidget::sizeHint().

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

C++ documentation:

Reimplemented from QWidget::sizeHint().

Trait Implementations

impl CppDeletable for QInputDialog[src]

unsafe fn delete(&self)[src]

Destroys the input dialog.

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

C++ documentation:

Destroys the input dialog.

This function was introduced in Qt 4.5.

impl Deref for QInputDialog[src]

type Target = QDialog

The resulting type after dereferencing.

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

Calls C++ function: QDialog* static_cast<QDialog*>(QInputDialog* ptr).

impl DynamicCast<QInputDialog> for QDialog[src]

unsafe fn dynamic_cast(ptr: Ptr<QDialog>) -> Ptr<QInputDialog>[src]

Calls C++ function: QInputDialog* dynamic_cast<QInputDialog*>(QDialog* ptr).

impl DynamicCast<QInputDialog> for QWidget[src]

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

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

impl DynamicCast<QInputDialog> for QObject[src]

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

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

impl DynamicCast<QInputDialog> for QPaintDevice[src]

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

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

impl StaticDowncast<QInputDialog> for QDialog[src]

unsafe fn static_downcast(ptr: Ptr<QDialog>) -> Ptr<QInputDialog>[src]

Calls C++ function: QInputDialog* static_cast<QInputDialog*>(QDialog* ptr).

impl StaticDowncast<QInputDialog> for QWidget[src]

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

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

impl StaticDowncast<QInputDialog> for QObject[src]

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

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

impl StaticDowncast<QInputDialog> for QPaintDevice[src]

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

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

impl StaticUpcast<QDialog> for QInputDialog[src]

unsafe fn static_upcast(ptr: Ptr<QInputDialog>) -> Ptr<QDialog>[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QInputDialog* ptr).

impl StaticUpcast<QObject> for QInputDialog[src]

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

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

impl StaticUpcast<QPaintDevice> for QInputDialog[src]

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

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

impl StaticUpcast<QWidget> for QInputDialog[src]

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

Calls C++ function: QWidget* static_cast<QWidget*>(QInputDialog* 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.