PythonQt.QtGui.QLineEdit · declarations 001
Back to PythonQt.QtGui.QLineEdit
ActionPosition
instance-attribute
ActionPosition: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
EchoMode
instance-attribute
EchoMode: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
LeadingPosition
instance-attribute
LeadingPosition: Any
NoEcho
instance-attribute
NoEcho: Any
Password
instance-attribute
Password: Any
PasswordEchoOnEdit
instance-attribute
PasswordEchoOnEdit: Any
TrailingPosition
instance-attribute
TrailingPosition: Any
acceptableInput
instance-attribute
acceptableInput: Any
Qt 5 reference:
acceptableInput : const bool
This property holds whether the input satisfies the inputMask and the validator.
By default, this property is true.
Access functions:
| bool | hasAcceptableInput() const |
|---|---|
See also setInputMask() and setValidator().
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#acceptableInput
addAction
addAction(action: Any, position: Any) -> Any
X.addAction(action, position)
Supplemental documentation: Qt 5 reference:
void QLineEdit::addAction(QAction *action, QLineEdit::ActionPosition position)
Adds the action to the list of actions at the position.
This function was introduced in Qt 5.2.
QAction *QLineEdit::addAction(const QIcon \&icon, QLineEdit::ActionPosition position)
This is an overloaded function.
Creates a new action with the given icon at the position.
This function was introduced in Qt 5.2.
Upstream PySide2 reference signatures (binding differences may apply):
addAction(self, action: PySide2.QtWidgets.QAction) -> None
addAction(self, action: PySide2.QtWidgets.QAction, position: PySide2.QtWidgets.QLineEdit.ActionPosition) -> None
addAction(self, arg__1: PySide2.QtWidgets.QAction) -> None
addAction(self, icon: PySide2.QtGui.QIcon, position: PySide2.QtWidgets.QLineEdit.ActionPosition) -> PySide2.QtWidgets.QAction
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#addAction
alignment
instance-attribute
alignment: Any
Qt 5 reference:
alignment : Qt::Alignment
This property holds the alignment of the line edit.
Both horizontal and vertical alignment is allowed here, Qt::AlignJustify will map to Qt::AlignLeft.
By default, this property contains a combination of Qt::AlignLeft and Qt::AlignVCenter.
Access functions:
| Qt::Alignment | alignment() const |
|---|---|
| void | setAlignment(Qt::Alignment flag) |
See also Qt::Alignment.
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#alignment
backspace
backspace() -> None
X.backspace()
Supplemental documentation: Qt 5 reference:
void QLineEdit::backspace()
If no text is selected, deletes the character to the left of the text cursor and moves the cursor one position to the left. If any text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.
See also del().
Upstream PySide2 reference signatures (binding differences may apply):
backspace(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#backspace
changeEvent
changeEvent(arg__1: Any) -> None
X.changeEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::changeEvent(QEvent *ev)
Reimplements: QWidget::changeEvent(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
changeEvent(self, arg__1: PySide2.QtCore.QEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#changeEvent
clear
clear() -> None
X.clear()
Supplemental documentation: Qt 5 reference:
[slot] void QLineEdit::clear()
Clears the contents of the line edit.
See also setText() and insert().
Upstream PySide2 reference signatures (binding differences may apply):
clear(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#clear
clearButtonEnabled
instance-attribute
clearButtonEnabled: Any
Qt 5 reference:
clearButtonEnabled : bool
This property holds whether the line edit displays a clear button when it is not empty.
If enabled, the line edit displays a trailing clear button when it contains some text, otherwise the line edit does not show a clear button (the default).
This property was introduced in Qt 5.2.
Access functions:
| bool | isClearButtonEnabled() const |
|---|---|
| void | setClearButtonEnabled(bool enable) |
See also addAction() and removeAction().
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#clearButtonEnabled
completer
completer() -> Any
X.completer() -> PythonQt.QtGui.QCompleter
Supplemental documentation: Qt 5 reference:
QCompleter *QLineEdit::completer() const
Returns the current QCompleter that provides completions.
This function was introduced in Qt 4.2.
See also setCompleter().
Upstream PySide2 reference signatures (binding differences may apply):
completer(self) -> PySide2.QtWidgets.QCompleter
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#completer
contextMenuEvent
contextMenuEvent(arg__1: Any) -> None
X.contextMenuEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::contextMenuEvent(QContextMenuEvent *event)
Reimplements: QWidget::contextMenuEvent(QContextMenuEvent *event).
Shows the standard context menu created with createStandardContextMenu().
If you do not want the line edit to have a context menu, you can set its contextMenuPolicy to Qt::NoContextMenu. If you want to customize the context menu, reimplement this function. If you want to extend the standard context menu, reimplement this function, call createStandardContextMenu() and extend the menu returned.
void LineEdit::contextMenuEvent(QContextMenuEvent *event)
{
QMenu *menu = createStandardContextMenu();
menu->addAction(tr("My Menu Item"));
//...
menu->exec(event->globalPos());
delete menu;
}
The event parameter is used to obtain the position where the mouse cursor was when the event was generated.
See also setContextMenuPolicy().
Upstream PySide2 reference signatures (binding differences may apply):
contextMenuEvent(self, arg__1: PySide2.QtGui.QContextMenuEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#contextMenuEvent
copy
copy() -> None
X.copy()
Supplemental documentation: Qt 5 reference:
[slot] void QLineEdit::copy() const
Copies the selected text to the clipboard, if there is any, and if echoMode() is Normal.
Upstream PySide2 reference signatures (binding differences may apply):
copy(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#copy
createStandardContextMenu
createStandardContextMenu() -> Any
X.createStandardContextMenu() -> PythonQt.QtGui.QMenu
Supplemental documentation: Qt 5 reference:
QMenu *QLineEdit::createStandardContextMenu()
This function creates the standard context menu which is shown when the user clicks on the line edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.
Upstream PySide2 reference signatures (binding differences may apply):
createStandardContextMenu(self) -> PySide2.QtWidgets.QMenu
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#createStandardContextMenu
cursorBackward
cursorBackward(mark: bool, steps: int) -> None
X.cursorBackward(mark, steps)
Supplemental documentation: Qt 5 reference:
void QLineEdit::cursorBackward(bool mark, int steps \= 1)
Moves the cursor back steps characters. If mark is true each character moved over is added to the selection; if mark is false the selection is cleared.
See also cursorForward().
Upstream PySide2 reference signatures (binding differences may apply):
cursorBackward(self, mark: bool, steps: int=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorBackward
cursorForward
cursorForward(mark: bool, steps: int) -> None
X.cursorForward(mark, steps)
Supplemental documentation: Qt 5 reference:
void QLineEdit::cursorForward(bool mark, int steps \= 1)
Moves the cursor forward steps characters. If mark is true each character moved over is added to the selection; if mark is false the selection is cleared.
See also cursorBackward().
Upstream PySide2 reference signatures (binding differences may apply):
cursorForward(self, mark: bool, steps: int=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorForward
cursorMoveStyle
instance-attribute
cursorMoveStyle: Any
Qt 5 reference:
cursorMoveStyle : Qt::CursorMoveStyle
This property holds the movement style of cursor in this line edit.
When this property is set to Qt::VisualMoveStyle, the line edit will use visual movement style. Pressing the left arrow key will always cause the cursor to move left, regardless of the text's writing direction. The same behavior applies to right arrow key.
When the property is Qt::LogicalMoveStyle (the default), within a LTR text block, increase cursor position when pressing left arrow key, decrease cursor position when pressing the right arrow key. If the text block is right to left, the opposite behavior applies.
This property was introduced in Qt 4.8.
Access functions:
| Qt::CursorMoveStyle | cursorMoveStyle() const |
|---|---|
| void | setCursorMoveStyle(Qt::CursorMoveStyle style) |
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorMoveStyle
cursorPosition
instance-attribute
cursorPosition: int
Qt 5 reference:
cursorPosition : int
This property holds the current cursor position for this line edit.
Setting the cursor position causes a repaint when appropriate.
By default, this property contains a value of 0.
Access functions:
| int | cursorPosition() const |
|---|---|
| void | setCursorPosition(int) |
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorPosition
cursorPositionAt
cursorPositionAt(pos: Any) -> int
X.cursorPositionAt(pos) -> int
Supplemental documentation: Qt 5 reference:
int QLineEdit::cursorPositionAt(const QPoint \&pos)
Returns the cursor position under the point pos.
Upstream PySide2 reference signatures (binding differences may apply):
cursorPositionAt(self, pos: PySide2.QtCore.QPoint) -> int
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorPositionAt
cursorPositionChanged
cursorPositionChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QLineEdit.cursorPositionChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QLineEdit::cursorPositionChanged(int oldPos, int newPos)
This signal is emitted whenever the cursor moves. The previous position is given by oldPos, and the new position by newPos.
See also setCursorPosition() and cursorPosition().
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorPositionChanged
cursorRect
cursorRect() -> Any
X.cursorRect() -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[protected] QRect QLineEdit::cursorRect() const
Returns a rectangle that includes the lineedit cursor.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
cursorRect(self) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorRect
cursorWordBackward
cursorWordBackward(mark: bool) -> None
X.cursorWordBackward(mark)
Supplemental documentation: Qt 5 reference:
void QLineEdit::cursorWordBackward(bool mark)
Moves the cursor one word backward. If mark is true, the word is also selected.
See also cursorWordForward().
Upstream PySide2 reference signatures (binding differences may apply):
cursorWordBackward(self, mark: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorWordBackward
cursorWordForward
cursorWordForward(mark: bool) -> None
X.cursorWordForward(mark)
Supplemental documentation: Qt 5 reference:
void QLineEdit::cursorWordForward(bool mark)
Moves the cursor one word forward. If mark is true, the word is also selected.
See also cursorWordBackward().
Upstream PySide2 reference signatures (binding differences may apply):
cursorWordForward(self, mark: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cursorWordForward
customContextMenuRequested
customContextMenuRequested(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QLineEdit.customContextMenuRequested; argument details are not documented.
cut
cut() -> None
X.cut()
Supplemental documentation: Qt 5 reference:
[slot] void QLineEdit::cut()
Copies the selected text to the clipboard and deletes it, if there is any, and if echoMode() is Normal.
If the current validator disallows deleting the selected text, cut() will copy without deleting.
See also copy(), paste(), and setValidator().
Upstream PySide2 reference signatures (binding differences may apply):
cut(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#cut
del_
del_() -> Any
X.del()
Native spelling: del; access it through getattr on the native object.
Supplemental documentation: Qt 5 reference:
void QLineEdit::del()
If no text is selected, deletes the character to the right of the text cursor. If any text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.
See also backspace().
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#del
deselect
deselect() -> None
X.deselect()
Supplemental documentation: Qt 5 reference:
void QLineEdit::deselect()
Deselects any selected text.
See also setSelection() and selectAll().
Upstream PySide2 reference signatures (binding differences may apply):
deselect(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#deselect
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QLineEdit.destroyed; argument details are not documented.
displayText
instance-attribute
displayText: str
Qt 5 reference:
displayText : const QString
This property holds the displayed text.
If echoMode is Normal this returns the same as text(); if EchoMode is Password or PasswordEchoOnEdit it returns a string of platform-dependent password mask characters text().length() in size, e.g. "******"; if EchoMode is NoEcho returns an empty string, "".
By default, this property contains an empty string.
Access functions:
| QString | displayText() const |
|---|---|
See also setEchoMode(), text(), and EchoMode.
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#displayText
dragEnabled
instance-attribute
dragEnabled: bool
Qt 5 reference:
dragEnabled : bool
This property holds whether the lineedit starts a drag if the user presses and moves the mouse on some selected text.
Dragging is disabled by default.
Access functions:
| bool | dragEnabled() const |
|---|---|
| void | setDragEnabled(bool b) |
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#dragEnabled
dragEnterEvent
dragEnterEvent(arg__1: Any) -> None
X.dragEnterEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::dragEnterEvent(QDragEnterEvent *e)
Reimplements: QWidget::dragEnterEvent(QDragEnterEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
dragEnterEvent(self, arg__1: PySide2.QtGui.QDragEnterEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#dragEnterEvent
dragLeaveEvent
dragLeaveEvent(e: Any) -> None
X.dragLeaveEvent(e)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::dragLeaveEvent(QDragLeaveEvent *e)
Reimplements: QWidget::dragLeaveEvent(QDragLeaveEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
dragLeaveEvent(self, e: PySide2.QtGui.QDragLeaveEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#dragLeaveEvent
dragMoveEvent
dragMoveEvent(e: Any) -> None
X.dragMoveEvent(e)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::dragMoveEvent(QDragMoveEvent *e)
Reimplements: QWidget::dragMoveEvent(QDragMoveEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
dragMoveEvent(self, e: PySide2.QtGui.QDragMoveEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#dragMoveEvent
dropEvent
dropEvent(arg__1: Any) -> None
X.dropEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QLineEdit::dropEvent(QDropEvent *e)
Reimplements: QWidget::dropEvent(QDropEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
dropEvent(self, arg__1: PySide2.QtGui.QDropEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#dropEvent
echoMode
instance-attribute
echoMode: Any
Qt 5 reference:
echoMode : EchoMode
This property holds the line edit's echo mode.
The echo mode determines how the text entered in the line edit is displayed (or echoed) to the user.
The most common setting is Normal, in which the text entered by the user is displayed verbatim, but QLineEdit also supports modes that allow the entered text to be suppressed or obscured: these include NoEcho, Password and PasswordEchoOnEdit.
The widget's display and the ability to copy or drag the text is affected by this setting.
By default, this property is set to Normal.
Access functions:
| QLineEdit::EchoMode | echoMode() const |
|---|---|
| void | setEchoMode(QLineEdit::EchoMode) |
See also EchoMode and displayText().
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#echoMode
editingFinished
editingFinished(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QLineEdit.editingFinished; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QLineEdit::editingFinished()
This signal is emitted when the Return or Enter key is pressed or the line edit loses focus. Note that if there is a validator() or inputMask() set on the line edit and enter/return is pressed, the editingFinished() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.
Source: https://doc.qt.io/archives/qt-5.15/qlineedit.html#editingFinished