-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.2
-
None
Both variants of QStackedLayout.widget can return None but this is not documented in the type hints.
Current (incorrect) type hints
@typing.overload
def widget(self, /) -> PySide6.QtWidgets.QWidget: ...
@typing.overload
def widget(self, arg__1: int, /) -> PySide6.QtWidgets.QWidget: ...
Correct type hints
@typing.overload
def widget(self, /) -> PySide6.QtWidgets.QWidget | None: ...
@typing.overload
def widget(self, arg__1: int, /) -> PySide6.QtWidgets.QWidget | None: ...
The first form is inherited from QLayoutItem and the second form is implemented by QStackedLayout