May 2019
Intermediate to advanced
542 pages
13h 37m
English
def save_as(self): filename, _ = qtw.QFileDialog(self) self.data.save_file(filename)
It's view code, since it creates a GUI element (the file dialog) and seems to call back to what might be a model (self.data).
Examples of things models should never do are create or directly alter GUI elements, format data for presentation, or close the application. Examples of things views should never do are save data to disk, perform transformations on the stored data (such as sorting or arithmetic), or read data from anything other ...
Read now
Unlock full access