Line Edit Widget (lineedit)

A LineEdit class with a button on left/right side.

class orangecanvas.gui.lineedit.LineEdit(*args, **kwargs)[source]

Bases: PyQt5.QtWidgets.QLineEdit

A line edit widget with support for adding actions (buttons) to the left/right of the edited text

LeftPosition = 1

Position flags

Left position flag

RightPosition = 2

Position flags

Right position flag

triggered(QAction)

Emitted when the action is triggered.

leftTriggered

The left action was triggered.

rightTriggered

The right action was triggered.

setAction(action, position=1)[source]

Set action to be displayed at position. Existing action (if present) will be removed.

Parameters
  • action (QAction) –

  • position (int) – Position where to set the action (default: LeftPosition).

actionAt(position)[source]

Return QAction at position.

removeActionAt(position)[source]

Remove the action at position.

button(position)[source]

Return the button (LineEditButton) for the action at position.

resizeEvent(self, QResizeEvent)[source]