ComboBox#

class pyqtgraph.ComboBox(parent=None, items=None, default=None)[source]#

Extends QComboBox to add extra functionality.

  • Handles dict mappings – user selects a text key, and the ComboBox indicates the selected value.

  • Requires item strings to be unique

  • Remembers selected value if list is cleared and subsequently repopulated

  • setItems() replaces the items in the ComboBox and blocks signals if the value ultimately does not change.

__init__(parent=None, items=None, default=None)[source]#
setText(text)[source]#

Set the selected item to the first one having the given text.

setValue(value)[source]#

Set the selected item to the first one having the given value.

value()[source]#

If items were given as a list of strings, then return the currently selected text. If items were given as a dict, then return the value corresponding to the currently selected key. If the combo list is empty, return None.