-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.9.2
-
None
-
-
dabfd4317 (6.10), cab65daa7 (tqtc/lts-6.8), 212bfa6d8 (dev)
QLayoutItem.spacerItem and QLayoutItem.widget can return None but this is not reflected in the type hints.
Current (incorrect) type hints
def spacerItem(self, /) -> PySide6.QtWidgets.QSpacerItem: ... def widget(self, /) -> PySide6.QtWidgets.QWidget: ...
Correct type hints
def spacerItem(self, /) -> PySide6.QtWidgets.QSpacerItem | None: ... def widget(self, /) -> PySide6.QtWidgets.QWidget | None: ...