Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.5.3
-
None
-
-
7004b3337 (dev), 6bafa39e1 (6.6), c4e0836a7 (6.5)
Description
QAbstractItemView.setModel as well as QGraphicsView.setScene can be reset (remove model or scene) by passing None. Nevertheless, this is not reflected in the typing (running mypy 1.5.1 against PySide 6.5.3):
error: Argument 1 to "setModel" of "QHeaderView" has incompatible type "None"; expected "QAbstractItemModel" [arg-type] error: Argument 1 to "setScene" of "QGraphicsView" has incompatible type "None"; expected "QGraphicsScene" [arg-type]
Attachments
Issue Links
- relates to
-
PYSIDE-2235 typing: QtWidget.setParent can be optionally None
- Closed
For Gerrit Dashboard: PYSIDE-2514 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
515092,2 | Allow None in type hints of QAbstractItemView.setModel()/QGraphicsView.setScene() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
515395,2 | Allow None in type hints of QAbstractItemView.setModel()/QGraphicsView.setScene() | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
515457,2 | Allow None in type hints of QAbstractItemView.setModel()/QGraphicsView.setScene() | 6.5 | pyside/pyside-setup | Status: MERGED | +2 | 0 |