Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.2.3
-
None
Description
I was using PySide6 for a project and found that the type hinting was misleading, as when I was using the function selectedIndexes() on a QListWidget, i was (theoretically in the type hints) recieving a
List[int]
when in fact the return type was
List[PySide6.QtCore.QModelIndex]
. Hopefully this information will help other people that find themselves in my position. It's nothing major as it only affects type hinting and I can override the type hints by giving the variable itself a type hint, but it would be a nice QOL change.
Given that QListWidget uses QListView as a base, the change should be made there and not in QListWidget. The QtWidgets.pyi file shows that the "error" is in QListView.
Attachments
For Gerrit Dashboard: PYSIDE-1934 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
416315,4 | Fix type hinting for QListWidget selected_indexes() return | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
416897,2 | Fix type hinting for QListWidget selected_indexes() return | 6.3 | pyside/pyside-setup | Status: MERGED | +2 | 0 |