QEvent.Type(QEvent.registerEventType()) fails

Matthieu Dartiailh m.dartiailh at gmail.com
Wed Jan 26 20:16:01 GMT 2022


Hi,

My issue however is that PySide6 is stricter in this case and will 
reject calling QEvent with an integer argument but supports 
QEvent.Type(QEvent.registerEventType()) (not sure what the magic is here).

As a consequence, supporting both is a bit more awkward than it could 
be. Do you consider this issue as a won't fix ? I can work around, I 
would just like to know.

Best

Matthieu

Le 1/26/2022 à 5:29 PM, Phil Thompson a écrit :
> On 26/01/2022 12:30, Matthieu Dartiailh wrote:
>> Hi,
>>
>> In PyQt 6.2.2, QEvent.Type(QEvent.registerEventType()) fails saying
>> that the integer that was picked by QEvent.registerEventType() is not
>> a valid value. Is this something that could be fixed ?
>
> No. Type is an enum and so has a fixed set of members. The following 
> works as you would expect...
>
> QEvent(QEvent.registerEventType())
>
> Phil



More information about the PyQt mailing list