# eric6.E5Gui.E5TextInputDialog

Module implementing a dialog to enter some text.

### Global Attributes

None

### Classes

E5TextInputDialog | Class implementing a dialog to enter some text.

### Functions

getText | Function to get create a dialog to enter some text and return it.

## E5TextInputDialog

Class implementing a dialog to enter some text.

### Derived from

QDialog

### Class Attributes

None

### Class Methods

None

### Methods

E5TextInputDialog | Constructor
labelText | Public method to get the current label text.
setLabelText | Public method to set the label text.
setTextEchoMode | Public method to set the echo mode of the line edit.
setTextValue | Public method to set the text of the line edit.
textEchoMode | Public method to get the current echo mode of the line edit.
textValue | Public method to get the text of the line edit.

### Static Methods

None

#### E5TextInputDialog (Constructor)

E5TextInputDialog(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### E5TextInputDialog.labelText

labelText()

Public method to get the current label text.

Returns:
  current label text

Return Type:
  str

#### E5TextInputDialog.setLabelText

setLabelText(text)

Public method to set the label text.

text (str)
  label text

#### E5TextInputDialog.setTextEchoMode

setTextEchoMode(echoMode)

Public method to set the echo mode of the line edit.

echoMode (QLineEdit.EchoMode)
  echo mode of the line edit

#### E5TextInputDialog.setTextValue

setTextValue(text)

Public method to set the text of the line edit.

text (str)
  text for the line edit

#### E5TextInputDialog.textEchoMode

textEchoMode()

Public method to get the current echo mode of the line edit.

Returns:
  echo mode of the line edit

Return Type:
  QLineEdit.EchoMode

#### E5TextInputDialog.textValue

textValue()

Public method to get the text of the line edit.

Returns:
  text of the line edit

Return Type:
  str

Up

## getText

getText(parent, title, label, mode=QLineEdit.Normal, text="", minimumWidth=300)

Function to get create a dialog to enter some text and return it.

parent (QWidget)
  reference to the parent widget
title (str)
  title of the dialog
label (str)
  label of the dialog
mode (QLineEdit.EchoMode)
  echo mode of the line edit
text (str)
  initial text of the line edit
minimumWidth (int)
  minimum width of the dialog

Returns:
  tuple containing a flag indicating the dialog was accepted and the entered text

Return Type:
  tuple of (bool, str)

Up