Вы должны определить положение щелчка мыши и убедиться, что комплексное управление имеет вид QStyle :: SC_ComboBoxArrow:
import sys
from PySide2 import QtCore, QtGui, QtWidgets
class ComboBox(QtWidgets.QComboBox):
arrowClicked = QtCore.Signal()
def mousePressEvent(self, event):
super().mousePressEvent(event)
opt = QtWidgets.QStyleOptionComboBox()
opt.initFrom(self)
opt.subControls = QtWidgets.QStyle.SC_All
opt.activeSubControls = QtWidgets.QStyle.SC_None
opt.editable = self.isEditable()
cc = self.style().hitTestComplexControl(
QtWidgets.QStyle.CC_ComboBox, opt, event.pos(), self
)
if cc == QtWidgets.QStyle.SC_ComboBoxArrow:
self.arrowClicked.emit()
def main():
app = QtWidgets.QApplication(sys.argv)
w = ComboBox()
w.addItems(["option1", "option2", "option3"])
w.show()
w.arrowClicked.connect(
lambda: print("index: {}, value: {}".format(w.currentIndex(), w.currentText()))
)
sys.exit(app.exec_())
if __name__ == "__main__":
main()