QNodeEditor.widgets.combo_box.ComboBox#

class QNodeEditor.widgets.combo_box.ComboBox(name: str, *args, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>, **kwargs)#

Bases: QComboBox

Widget with a combo box that allows selection of predefined options.

The combo box has a custom layout showing its name as an unselectable option in the drop-down menu.

Properties

popup_changed(bool)

Signal that emits when the drop-down opens (True) or closes (False)

theme

Get or set the combo box theme.

Methods

__init__

Create a new combo box.

eventFilter

Close the drop-down menu if the mouse leaves the popup.

hidePopup

Emit change signal when closing popup.

showPopup

Emit change signal when opening popup.

__init__(name: str, *args, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>, **kwargs)#

Create a new combo box.

Parameters:
  • name (str) – Name of the combo box

  • theme (Type[Theme], optional) – Theme for the combo box (default: DarkTheme)

popup_changed(bool): Signal#

Signal that emits when the drop-down opens (True) or closes (False)

Type:

Signal

property theme: Type[Theme]#

Get or set the combo box theme.