What's up with the awful documentation?
-
Hey, I'm new to Qt for Python, just trying to follow the docs to create a TreeView + model... But the documentation is so incredibly broken? In what universe is this sort of thing valid Python or C++ or anything else for that matter? And it seems this one page of the docs is far from the only one with this sort of mess in the snippets. It makes the whole documentation borderline useless. Are there any non-broken resources I can use to learn this? Thanks.

-
Hey, I'm new to Qt for Python, just trying to follow the docs to create a TreeView + model... But the documentation is so incredibly broken? In what universe is this sort of thing valid Python or C++ or anything else for that matter? And it seems this one page of the docs is far from the only one with this sort of mess in the snippets. It makes the whole documentation borderline useless. Are there any non-broken resources I can use to learn this? Thanks.

Hi, and welcome!
@hanetar said in What's up with the awful documentation?:
the documentation is so incredibly broken?
Thanks for reporting this. I've created a bug report for the issues seen in this snippet: https://bugreports.qt.io/browse/PYSIDE-2030
See the comments at https://bugreports.qt.io/browse/PYSIDE-1952 for some insight to why such brokenness exists.
Are there any non-broken resources I can use to learn this?
Try searching for tutorials that are written specifically for Python, rather than those that were auto-converted from C++.
I haven't gone through it in detail myself, but this one looks like it was done with care: https://www.pythonguis.com/pyside6-tutorial/ (although personally, I wouldn't touch threads so early in the series)