retype.ui.line_edit

QPlainTextEdit subclass which mimics QLineEdit. The idea is to make it

hotswappable for QLineEdit with no changes needed, so that you can have a QLineEdit without its inherent limitations, like not being able to modify the undo behaviour, not being able to use QCursor, etc.

Adapted from ssokolow’s OneLineSpellTextEdit: https://gist.github.com/ssokolow/abb20a30415fa4debce912c38060ca6a

NOTE: * textEdited probably works differently from QLineEdit’s textEdited, because I

am not sure yet how to replicate it exactly. For now it emits when the text changes by user key press.

  • Unimplemented signals: editingFinished, inputRejected

Classes

LineEdit([parent])

class retype.ui.line_edit.LineEdit(parent=None, *args)[source]

Bases: QWidget

cursorPositionChanged
font(self) QFont[source]
keyPressEvent(self, a0: QKeyEvent)[source]
minimumSizeHint(self) QSize[source]
returnPressed
selectionChanged
setAccessibleName(self, name: str)[source]
setFont(self, a0: QFont)[source]
setPlainText(text)[source]
setSizePolicy(self, a0: QSizePolicy)[source]
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStyleSheet(self, styleSheet: str)[source]
setText(text)[source]
sizeHint(self) QSize[source]
text()[source]
textChanged
textEdited