[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Bug in QAbstractNativeEventFilter in PyQt 5.1.1?
From:       "Klemetti, Antti" <antti.klemetti () f-secure ! com>
Date:       2013-12-11 8:11:20
Message-ID: B231271430F4B24296E202978C2210BD47505243ED () FSFIEX1 ! FI ! F-Secure ! com
[Download RAW message or body]

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.

BR, Antti
________________________________________
From: pyqt-bounces@riverbankcomputing.com [pyqt-bounces@riverbankcomputing.com] On \
                Behalf Of Phil Thompson [phil@riverbankcomputing.com]
Sent: Tuesday, December 10, 2013 7:17 PM
To: pyqt@riverbankcomputing.com
Subject: Re: [PyQt] Bug in QAbstractNativeEventFilter in PyQt 5.1.1?

On 10-12-2013 12:19 pm, Klemetti, Antti wrote:
> Hi,
> 
> You missed my point.
> If I return anything else than None (includes int values likes 0 and
> 1 and so on),
> the application using PyQt5 crashes.
> By returning None, I can avoid the crash, but I understand that I
> should return an int.
> Please try it yourself.

Then I need a simple, complete example that demonstrates the problem.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic