Zoey_Schlemper | 2020-05-07 18:12:18 UTC | #1
Thanks for this awesome tutorial. I have a question about complex data sets. Is it possible for me to use a .json file as my model's data in pyqt views? I have a rather complex data structure. Do I need to simplify it to a basic table?
https://www.pythonguis.com/courses/model-views/modelview-architecture/
martin | 2020-05-10 09:40:45 UTC | #2
Not at all! You can use any data structure you like in your model — just think of the model acting as an interface between how Qt want's to see your data, and how you want to represent it. As long as your model returns data in the format Qt expects it will work fine.
I have more tutorials on this coming shortly (e.g. using pandas datatables, querying databases and displaying complex datatypes).
David_Hansson | 2020-05-18 17:50:32 UTC | #3
Purchasing Power Parity
Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]More tutorials on using QTableView and how it interact with a QAbstractTableModel would be very usefull. The documentation for this on the internet and in meny of the books is very basic (to basic). And it is very frustrating to check your code for errors since this subject have meny pitfalls. Expanding your QTableView with QSortFilterProxyModell would also be a good follow up on this subject.
Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PyQt6 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!
PyQt/PySide 1:1 Coaching with Martin Fitzpatrick — Get one on one help with your Python GUI projects. Working together with you I'll identify issues and suggest fixes, from bugs and usability to architecture and maintainability.