Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.7.1, 6.7.2
-
None
-
Python 3.12.2 (CPython)
Windows 10
Description
I cannot compare the tick position enums with the bitwise operators & and | anymore after upgrading from 6.6.1 to 6.7.2
Minimal Reproducible example:
from PySide6.QtWidgets import QSlider if __name__ == "__main__": ticks = QSlider.TickPosition.TicksBothSides #0x3 if ticks & QSlider.TickPosition.TicksAbove: #0x1 print("TicksAbove") if ticks & QSlider.TickPosition.TicksBelow: #0x2 print("TicksBelow")
Gives the error:
Traceback (most recent call last): File "\qslider-Tickpos_min_repr.py", line 7, in <module> if ticks & QSlider.TickPosition.TicksAbove: ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TypeError: unsupported operand type(s) for &: 'TickPosition' and 'TickPosition'
I feel like this should be possible.