The VLineEdit is a widget that allow the user to enter and edit a single line of plain text.
Inherits: QLineEdit
Methods
Signals
The VLineEdit is a widget that allow the user to enter and edit a single line of plain text.
The line edit area can have a set of three buttons, one button for reset the line to the last state with setResetButton, one button to show the historic with setHistoricButton and one command button used to execute an action related to the entry with setCommandButton.
The line edit area may have also an informative text with setInformativeText.
![]()
Methods
Instanciate the VLineEdit.
Arguments:
- parent The parent of the VLineEdit.
Add an item into the historic. Since the historic is a stack, the entry is added at index 0.
Arguments:
- entry A str() or QString() instance
Raise TypeError if the argument is not string.
Add a list of items into the historic. Since the historic is a stack, the list is added at the beggining of the historic.
Arguments:
- entries A list of str()
- clear If True, the historic is cleared before adding the entries.
Returns the list of the historic’s items.
Type: list()
Returns the orientation of the button’s layout.
Type: Qt.LayoutDirection
See: setOrientation
Returns True if the VLineEdit has a command button, otherwise returns False.
Type: Boolean
See: setCommandButton
Returns True if the VLineEdit has a historic button, otherwise returns False.
Type: Boolean
See: setHistoricButton
Returns True if the VLineEdit has a reset button, otherwise returns False.
Type: Boolean
See: setResetButton
Returns the informative text.
Type: QString()
See: setInformativeText
Sets the command button.
The command button may be used for any action related with the entry, like ‘Go to this page’, ‘Search for this item’, etc.
The VLineEdit emit a signal commandTriggered when clicked.
This property can be defined in the Qt Designer.
Raise TypeError if the argument is not boolean.
See: hasCommandButton
Sets the command button icon.
Arguments:
- icon A QIcon or a QPixmap instance or an image file path.
Raise NameError if the VLineEdit has no command button.
Sets the historic button.
The VLineEdit emit a signal historicTriggered when clicked.
This property can be defined in the Qt Designer.
Arguments:
- b Boolean
Raise TypeError if the argument is not boolean.
See: hasHistoricButton
Sets the informative text.
This property can be defined in the Qt Designer.
Arguments:
- txt str() or QString() instance.
Raise TypeError if the argument is not string.
See: informativeText
Sets the orientation of the buttons.
This property can be defined in the Qt Designer.
Arguments:
- orientation Qt.LayoutDirection
Raise ValueError if the argument is not a Qt.LayoutDirection.
See: getOrientation
Set the reset button.
The reset button is used to reset the text line to the previous state.
The VLineEdit emit a signal resetTriggered when clicked.
This property can be defined in the Qt Designer.
Arguments:
- b Boolean
Raise TypeError if the argument is not boolean.
See: hasResetButton
Sets the reset button icon.
Arguments:
- icon A QIcon or a QPixmap instance or an image file path.
Raise NameError if the VLineEdit has no reset button.
Signals
This signal is sent whenever the user click on the button command.
Arguments:
- str The text edited.