class pydm.widgets.enum_combo_box.PyDMEnumComboBox(parent=None, init_channel=None)[source]

Bases: QComboBox, PyDMWritableWidget

A QComboBox with support for Channels and more from PyDM

  • parent (QWidget) – The parent widget for the Label

  • init_channel (str, optional) – The channel to be used by the widget.

  • Signals

  • -------

  • send_value_signal (int, float, str, bool or np.ndarray) – Emitted when the user changes the value.

  • activated (int, str) – Emitted when the user chooses an item in the combobox.

  • currentIndexChanged (int, str) – Emitted when the index is changed in the combobox.

  • highlighted (int, str) – Emitted when an item in the combobox popup list is highlighted by the user.

addItem(text, userData=None)[source]

Adds an item to the combobox. The item is appended to the list of existing items.

  • text (str) – Title of the item

  • userData (QVariant) – Arbitrary user data that is stored in the Qt.UserRole


Checks whether or not the widget should be disable. This method also disables the widget and add a Tool Tip with the reason why it is disabled.


Callback invoked when the Channel has new enum values. This callback also triggers a value_changed call so the new enum values to be broadcasted


new_enum_strings (tuple) – The new list of values


PyQT Slot for when the user chooses an item in the combobox. This slot triggers the `send_value_signal`. :param index: :type index: int

setItemText(index, text)[source]

Sets the text for the item on the given index in the combobox.

  • index (int) – Position in the dropdown list

  • text (str) – Title for the item


Internal method to fill the ComboBox items based on a list of strings.


enums (tuple) – The new list of values


Callback invoked when the Channel value is changed. Sets the value of new_value accordingly at the ComboBox.


new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

wheelEvent(self, e: Optional[QWheelEvent])[source]


See QComboBox Documentation for all inherited properties and methods.