Qt.AlignmentFlag can't be used as argument to functions expecting Qt.Alignment since PySide6 6.2.2.
Using this code which was typed correctly on 6.2.1:
detailslayout = QHBoxLayout() detailslayout.setAlignment(Qt.AlignLeft)
is now reporting type violations:
error: No overload variant of "setAlignment" of "QLayout" matches argument type "AlignmentFlag"
Furthermore Qt.AlignmentFlag is not composable anymore:
Qt.AlignLeft | Qt.AlignVCenter
reports
error: Unsupported left operand type for | ("AlignmentFlag")
The relevant change in QtCore.pyb seems to be the move from Shiboken.Enum to Enum for class AlignmentFlag:
# 6.2.1
class AlignmentFlag(Shiboken.Enum):
    AlignLeading             : Qt.AlignmentFlag = ... # 0x1
    AlignLeft                : Qt.AlignmentFlag = ... # 0x1
# 6.2.2
class AlignmentFlag(Enum):
    AlignLeading             : Qt.AlignmentFlag = ... # 0x1
    AlignLeft                : Qt.AlignmentFlag = ... # 0x1
- is required for
- 
                     PYSIDE-1675
        Improve mypy compatibility with our python stubs (pyi) PYSIDE-1675
        Improve mypy compatibility with our python stubs (pyi)-         
- Open
 
-         
- relates to
- 
                    PYSIDE-1520 Type Checking using mypy errors erroneously -         
- Closed
 
-         

