Problem with QAbstractItemModel.dataChanged
Björn Künsting
bjoern at corecode-dev.com
Tue Mar 7 19:23:38 GMT 2023
Hi Tony,
On Mon, 2023-03-06 at 14:25 +0000, Tony Arnold wrote:
>
> Shouldn't the type-hint the roles parameter be QList[int]? You have
> just List[int].
>
> I don't really understand what type-hints do, so I don't know if this
> will work.
As Maurizio already stated, type hints are irrelevant. Afaik, the
python interpreter ignores them. However, they help to prevent errors,
e.g., passing the wrong type to a function. You can use a tool like
mypy to check your code for such errors.
--
Bjoern
More information about the PyQt
mailing list