[PyQt] Bug in QAbstractNativeEventFilter in PyQt 5.1.1?
Phil Thompson
phil at riverbankcomputing.com
Sun Dec 29 17:54:17 GMT 2013
On 11-12-2013 8:11 am, Klemetti, Antti wrote:
> Hi,
>
> I already posted the code snippet, but here is a simplified version
> including the main function that installs the event filter to the
> QApplication:
> ------
> import sys
> from PyQt5.QtCore import QAbstractNativeEventFilter
> from PyQt5.QtWidgets import QApplication
>
> class WinEventFilter(QAbstractNativeEventFilter):
> def nativeEventFilter(self, eventType, message):
> return False, 0
>
> if __name__ == "__main__":
> app = QApplication(sys.argv)
> win_event_filter = WinEventFilter()
> app.installNativeEventFilter(win_event_filter)
> sys.exit(app.exec_())
> -----
>
> Whoever calls the WinEventFilter.nativeEventFilter,
> from the PyQt framework crashes when the function returns.
Should be fixed with tonight's SIP snapshot.
Thanks,
Phil
More information about the PyQt
mailing list