You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
337 B

  1. from PyQt5.QtWidgets import QComboBox
  2. from PyQt5.QtCore import pyqtSignal
  3. class MComboBox(QComboBox):
  4. """
  5. Modified version of combobox that emits a signal with the current item when clicked.
  6. """
  7. clicked = pyqtSignal(str)
  8. def showPopup(self):
  9. self.clicked.emit(self.currentText())
  10. super().showPopup()