eric7.EricWidgets.EricTextInputDialog

Module implementing a dialog to enter some text.

Global Attributes

None

Classes

EricTextInputDialog Class implementing a dialog to enter some text.

Functions

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


EricTextInputDialog

Class implementing a dialog to enter some text.

Derived from

QDialog

Class Attributes

None

Class Methods

None

Methods

EricTextInputDialog 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

EricTextInputDialog (Constructor)

EricTextInputDialog(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

EricTextInputDialog.labelText

labelText()

Public method to get the current label text.

Return:
current label text
Return Type:
str

EricTextInputDialog.setLabelText

setLabelText(text)

Public method to set the label text.

text (str)
label text

EricTextInputDialog.setTextEchoMode

setTextEchoMode(echoMode)

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

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

EricTextInputDialog.setTextValue

setTextValue(text)

Public method to set the text of the line edit.

text (str)
text for the line edit

EricTextInputDialog.textEchoMode

textEchoMode()

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

Return:
echo mode of the line edit
Return Type:
QLineEdit.EchoMode

EricTextInputDialog.textValue

textValue()

Public method to get the text of the line edit.

Return:
text of the line edit
Return Type:
str
Up


getText

getText(parent, title, label, mode=QLineEdit.EchoMode.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
Return:
tuple containing a flag indicating the dialog was accepted and the entered text
Return Type:
tuple of (bool, str)
Up