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.

12 lines
337 B

from PyQt5.QtWidgets import QComboBox
from PyQt5.QtCore import pyqtSignal
class MComboBox(QComboBox):
"""
Modified version of combobox that emits a signal with the current item when clicked.
"""
clicked = pyqtSignal(str)
def showPopup(self):
self.clicked.emit(self.currentText())
super().showPopup()