Error/crash/hang when comparing enum value to uncomparable type

Jean Abou Samra jean at
Wed Oct 26 11:49:50 BST 2022

Le 24/10/2022 à 03:16, Phil Thompson a écrit :
> PyQt5 enums don't support comparisons with strings. You could argue 
> that it should return False for any unsupported type (as PyQt6 does) 
> but it's far too late in the lifespan of PyQt5 to change the behaviour.

OK, I'll try to avoid that in the app.

One more question: did the comparison "<QEvent> == <QKeySequence member>"
"work" (return True sometimes and never raise) in older versions of
PyQt? I am wondering about this because I see lots of such comparisons
in the app in question.


More information about the PyQt mailing list