From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.

PyQT - event is blocked, when combobox is clicked

  • When i click the Arrow of the Combobox and the menue is shown, events are blocked. Any way of not blocking? I've created a minimal example, which demonstrates the problem. when you click the arrow and press for example some Keys on your keyboard, those are not propagated.

    import sys
    from PyQt4 import QtGui, QtCore

    class Example(QtGui.QMainWindow):
    	def __init__(self):
    		super(Example, self).__init__()
    	def initUI(self):      
    		#Help Menue =  QtGui.QComboBox(self)"help")"testA")"testB")"testC")
    		self.setGeometry(300, 300, 290, 150)
    		self.setWindowTitle('Event sender')
    	def eventFilter(self, source, event):
    		print event
    def main():
    	app = QtGui.QApplication(sys.argv)
    	ex = Example()
    if __name__ == '__main__':

  • Lifetime Qt Champion


    You are missing a return False in your filterEvent function see the C++ documentation for more details

Log in to reply