Skip to content

Input Widgets

Enhanced line edit widgets with additional functionality.

Preview

FXInputs

Classes

FXIconLineEdit

Bases: FXThemeAware, QLineEdit

A line edit that displays an icon on the left or right side.

The icon is theme-aware and will refresh automatically when the application theme changes.

Parameters:

Name Type Description Default

icon_name

Optional[str]

The name of the icon to display.

None

icon_position

str

The position of the icon ('left' or 'right').

'left'

parent

Optional[QWidget]

The parent widget.

None

Methods:

Name Description
resizeEvent

Reposition the icon when the line edit is resized.

resizeEvent

resizeEvent(event)

Reposition the icon when the line edit is resized.

FXPasswordLineEdit

Bases: FXThemeAware, QWidget

A custom widget that includes a password line edit with a show/hide button.

Parameters:

Name Type Description Default

parent

Optional[QWidget]

The parent widget.

None

icon_position

str

The position of the icon ('left' or 'right').

'right'

Methods:

Name Description
toggle_reveal

Toggles the echo mode between password and normal, and changes the

toggle_reveal

toggle_reveal()

Toggles the echo mode between password and normal, and changes the icon of the reveal button accordingly.