Search code examples
qtqt4pyqt4

Unknown QEvent type


I have a Qt application written in Python (with PyQt4) and, in the process of debugging a bug, I installed an event filter on my widget:

def eventFilter(self, obj, ev):
    print "Event:", ev, " | type:", ev.type()

One of the (many) lines of output was the following:

Event: <PyQt4.QtCore.QEvent object at 0x39a1dd0>  | type: 67

So I looked up the qt documentation http://qt-project.org/doc/qt-4.8/qevent.html#public-types and I can't find event type 67. (I also can't find 64, 65, 66, and a whole host of other event codes. For example, events #12, 13, and 14 exist, but events #15 and 16 don't.) I've tried google and SE searches, but I can't find reference to Qt event 67 anywhere at all.

So, my question is twofold: How can I find out what QEvent type 67 is, and why are there gaps in the QEvent codes?

Sidenote: Why is the table in those docs NOT ordered by event number? Seems like that would be the logical way to document the API.


Solution

  • From Qt sources I found the event:

    ChildInsertedRequest = 67, // send ChildInserted compatibility events to receiver
    

    This event comes from Qt3, and defined in Qt3 support library.