Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a signal for QComboBox in PyQt for when editing is complete?

Tags:

python

pyqt

pyqt4

In my application, it's problematic to have the editTextChanged signal sent after every single key press. I'd like to get the signal when the user presses enter or changes focus. Is there a simple way to accomplish this?

like image 700
Mastiff Avatar asked Sep 06 '25 03:09

Mastiff


1 Answers

Since you are using the QComboBox in editable mode then you can use the editingFinished signal from QLineEdit:

combo = QComboBox()
combo.setEditable(True)
combo.lineEdit().editingFinished.connect(foo_slot)
like image 140
eyllanesc Avatar answered Sep 07 '25 21:09

eyllanesc