Jerry_Zhou | 2020-05-07 18:42:52 UTC | #1
Hello! I am a confused as to the usage of the data() method that overrides the QAbstractListModel. It is never actually invoked despite being explained as the only way views can retrieve data from the model. I see that in the code, views retrieve data instead by just directly using todo[index] rather than calling the data() method. I was also wondering how roles are then assigned to these data values?
Create GUI Applications with Python & Qt5 by Martin Fitzpatrick — (PyQt5 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!