line_edit

Module Contents

LineEditButton

Line edit button

LineEdit

Line edit

CompleterMenu

Completer menu

SearchLineEdit

Search line edit

EditLayer

Edit layer

TextEdit

Text edit

PlainTextEdit

Plain text edit

TextBrowser

Text browser

PasswordLineEdit

Password line edit

class LineEditButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None)

Bases: PyQt5.QtWidgets.QToolButton

Line edit button

isPressed = False
setAction(action: PyQt5.QtWidgets.QAction)
action()
setIcon(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon)
mousePressEvent(e)
mouseReleaseEvent(e)
paintEvent(e)
class LineEdit(parent=None)

Bases: PyQt5.QtWidgets.QLineEdit

Line edit

lightFocusedBorderColor
darkFocusedBorderColor
leftButtons: List[LineEditButton] = []
rightButtons: List[LineEditButton] = []
hBoxLayout
clearButton
isError()
setError(isError: bool)

set the error status

setCustomFocusedBorderColor(light, dark)

set the border color in focused status

Parameters

light, dark: str | QColor | Qt.GlobalColor

border color in light/dark theme mode

focusedBorderColor()
setClearButtonEnabled(enable: bool)
isClearButtonEnabled() bool
setCompleter(completer: PyQt5.QtWidgets.QCompleter)
completer()
addAction(action: PyQt5.QtWidgets.QAction, position=QLineEdit.ActionPosition.TrailingPosition)
addActions(actions, position=QLineEdit.ActionPosition.TrailingPosition)
focusOutEvent(e)
focusInEvent(e)
setCompleterMenu(menu)

set completer menu

Parameters

menu: CompleterMenu

completer menu

contextMenuEvent(e)
paintEvent(e)
class CompleterMenu(lineEdit: LineEdit)

Bases: qfluentwidgets.components.widgets.menu.RoundMenu

Completer menu

activated
indexActivated
items = []
indexes = []
lineEdit
setCompletion(model: PyQt5.QtCore.QAbstractItemModel, column=0)

set the completion model

setItems(items: List[str])

set completion items

eventFilter(obj, e: PyQt5.QtCore.QEvent)
popup()

show menu

class SearchLineEdit(parent=None)

Bases: LineEdit

Search line edit

searchSignal
clearSignal
searchButton
search()

emit search signal

setClearButtonEnabled(enable: bool)
class EditLayer(parent)

Bases: PyQt5.QtWidgets.QWidget

Edit layer

eventFilter(obj, e)
paintEvent(e)
class TextEdit(parent=None)

Bases: PyQt5.QtWidgets.QTextEdit

Text edit

layer
scrollDelegate
contextMenuEvent(e)
class PlainTextEdit(parent=None)

Bases: PyQt5.QtWidgets.QPlainTextEdit

Plain text edit

layer
scrollDelegate
contextMenuEvent(e)
class TextBrowser(parent=None)

Bases: PyQt5.QtWidgets.QTextBrowser

Text browser

layer
scrollDelegate
contextMenuEvent(e)
class PasswordLineEdit(parent=None)

Bases: LineEdit

Password line edit

viewButton
setPasswordVisible(isVisible: bool)

set the visibility of password

isPasswordVisible()
setClearButtonEnabled(enable: bool)
setViewPasswordButtonVisible(isVisible: bool)

set the visibility of view password button

eventFilter(obj, e)
inputMethodQuery(query: PyQt5.QtCore.Qt.InputMethodQuery)
passwordVisible