line_edit ========= .. py:module:: qfluentwidgets.components.widgets.line_edit Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.line_edit.LineEditButton qfluentwidgets.components.widgets.line_edit.LineEdit qfluentwidgets.components.widgets.line_edit.CompleterMenu qfluentwidgets.components.widgets.line_edit.SearchLineEdit qfluentwidgets.components.widgets.line_edit.EditLayer qfluentwidgets.components.widgets.line_edit.TextEdit qfluentwidgets.components.widgets.line_edit.PlainTextEdit qfluentwidgets.components.widgets.line_edit.TextBrowser qfluentwidgets.components.widgets.line_edit.PasswordLineEdit .. py:class:: LineEditButton(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Line edit button .. py:attribute:: isPressed :value: False .. py:method:: setAction(action: PyQt5.QtWidgets.QAction) .. py:method:: action() .. py:method:: setIcon(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon]) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: LineEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QLineEdit` Line edit .. py:attribute:: lightFocusedBorderColor .. py:attribute:: darkFocusedBorderColor .. py:attribute:: leftButtons :type: List[LineEditButton] :value: [] .. py:attribute:: rightButtons :type: List[LineEditButton] :value: [] .. py:attribute:: hBoxLayout .. py:attribute:: clearButton .. py:method:: isError() .. py:method:: setError(isError: bool) set the error status .. py:method:: setCustomFocusedBorderColor(light, dark) set the border color in focused status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor border color in light/dark theme mode .. py:method:: focusedBorderColor() .. py:method:: setClearButtonEnabled(enable: bool) .. py:method:: isClearButtonEnabled() -> bool .. py:method:: setCompleter(completer: PyQt5.QtWidgets.QCompleter) .. py:method:: completer() .. py:method:: addAction(action: PyQt5.QtWidgets.QAction, position=QLineEdit.ActionPosition.TrailingPosition) .. py:method:: addActions(actions, position=QLineEdit.ActionPosition.TrailingPosition) .. py:method:: focusOutEvent(e) .. py:method:: focusInEvent(e) .. py:method:: setCompleterMenu(menu) set completer menu Parameters ---------- menu: CompleterMenu completer menu .. py:method:: contextMenuEvent(e) .. py:method:: paintEvent(e) .. py:class:: CompleterMenu(lineEdit: LineEdit) Bases: :py:obj:`qfluentwidgets.components.widgets.menu.RoundMenu` Completer menu .. py:attribute:: activated .. py:attribute:: indexActivated .. py:attribute:: items :value: [] .. py:attribute:: indexes :value: [] .. py:attribute:: lineEdit .. py:method:: setCompletion(model: PyQt5.QtCore.QAbstractItemModel, column=0) set the completion model .. py:method:: setItems(items: List[str]) set completion items .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: popup() show menu .. py:class:: SearchLineEdit(parent=None) Bases: :py:obj:`LineEdit` Search line edit .. py:attribute:: searchSignal .. py:attribute:: clearSignal .. py:attribute:: searchButton .. py:method:: search() emit search signal .. py:method:: setClearButtonEnabled(enable: bool) .. py:class:: EditLayer(parent) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Edit layer .. py:method:: eventFilter(obj, e) .. py:method:: paintEvent(e) .. py:class:: TextEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTextEdit` Text edit .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: PlainTextEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPlainTextEdit` Plain text edit .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: TextBrowser(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTextBrowser` Text browser .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: PasswordLineEdit(parent=None) Bases: :py:obj:`LineEdit` Password line edit .. py:attribute:: viewButton .. py:method:: setPasswordVisible(isVisible: bool) set the visibility of password .. py:method:: isPasswordVisible() .. py:method:: setClearButtonEnabled(enable: bool) .. py:method:: setViewPasswordButtonVisible(isVisible: bool) set the visibility of view password button .. py:method:: eventFilter(obj, e) .. py:method:: inputMethodQuery(query: PyQt5.QtCore.Qt.InputMethodQuery) .. py:attribute:: passwordVisible