I've been searching the internet far and wide for a tutorial on creating custom items for QListView using PySide. I find some usage using PyQt but I find them really strange to me. I would like to recreate using PySide the appearance of the items of the list shown in this link since I'm creating a desktop version of this web application. Any help/idea/sample code is greatly appreciated.
Asked
Active
Viewed 652 times
0
-
I doubt that you searched the internet far and wide. The first hit on google solves the problem for me. http://www.pythoncentral.io/pyside-pyqt-tutorial-the-qlistwidget/ is a very useful overview for PyQt/Pyside. Btw. PyQt/Pyside are almost identical. – NoDataDumpNoContribution Jan 26 '15 at 13:13
1 Answers
0
This question is pretty broad considering that you haven't shared any code. Nonetheless, let me point you to a good resource I found very useful getting into MVC programming in PyQt/PySide:
http://www.yasinuludag.com/blog/?p=98
He touches on ListView here and that may give you a better idea of how you can implement custom models and views.
He uses PySide from my recollection. Either ways, PyQt and PySide code are pretty much identical.
Another approach would be to not use QListView but use a QScrollArea and throw in the list items as widgets inside it. Each widget would be standard Qt widgets with a layout, sub widgets and styled as you need. Check this out for a similar scenario: PyQt: How can I create a custom scroll area?
Hope this helps.