The QInputDialog class provides a simple convenience dialog to get a single value from the user.
.PP
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.
.PP
Four static convenience functions are provided: getText(), getInteger(), getDouble() and getItem(). All the functions can be used in a similar way, for example:
Static convenience function to get a floating point number from the user. \fIcaption\fR is the text which is displayed in the title bar of the dialog. \fIlabel\fR is the text which is shown to the user (it should say what should be entered). \fIvalue\fR is the default floating point number that the line edit will be set to. \fIminValue\fR and \fImaxValue\fR are the minimum and maximum values the user may choose, and \fIdecimals\fR is the maximum number of decimal places the number may have.
.PP
If \fIok\fR is not-null \fI*\fR\fIok\fR will be set to TRUE if the user pressed OK and to FALSE if the user pressed Cancel. The dialog's parent is \fIparent\fR; the dialog is called \fIname\fR. The dialog will be modal.
.PP
This function returns the floating point number which has been entered by the user.
Static convenience function to get an integer input from the user. \fIcaption\fR is the text which is displayed in the title bar of the dialog. \fIlabel\fR is the text which is shown to the user (it should say what should be entered). \fIvalue\fR is the default integer which the spinbox will be set to. \fIminValue\fR and \fImaxValue\fR are the minimum and maximum values the user may choose, and \fIstep\fR is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value.
.PP
If \fIok\fR is not-null *\fIok\fR will be set to TRUE if the user pressed OK and to FALSE if the user pressed Cancel. The dialog's parent is \fIparent\fR; the dialog is called \fIname\fR. The dialog will be modal.
.PP
This function returns the integer which has been entered by the user.
Static convenience function to let the user select an item from a string list. \fIcaption\fR is the text which is displayed in the title bar of the dialog. \fIlabel\fR is the text which is shown to the user (it should say what should be entered). \fIlist\fR is the string list which is inserted into the combobox, and \fIcurrent\fR is the number of the item which should be the current item. If \fIeditable\fR is TRUE the user can enter their own text; if \fIeditable\fR is FALSE the user may only select one of the existing items.
.PP
If \fIok\fR is not-null \fI*\fR\fIok\fR will be set to TRUE if the user pressed OK and to FALSE if the user pressed Cancel. The dialog's parent is \fIparent\fR; the dialog is called \fIname\fR. The dialog will be modal.
.PP
This function returns the text of the current item, or if \fIeditable\fR is TRUE, the current text of the combobox.
Static convenience function to get a string from the user. \fIcaption\fR is the text which is displayed in the title bar of the dialog. \fIlabel\fR is the text which is shown to the user (it should say what should be entered). \fItext\fR is the default text which is placed in the line edit. The \fImode\fR is the echo mode the line edit will use. If \fIok\fR is not-null \fI*\fR\fIok\fR will be set to TRUE if the user pressed OK and to FALSE if the user pressed Cancel. The dialog's parent is \fIparent\fR; the dialog is called \fIname\fR. The dialog will be modal.
.PP
This function returns the text which has been entered in the line edit. It will not return an empty string.