Organizing desktop application

Rich Shepard rshepard at appl-ecosys.com
Tue Apr 13 17:39:27 BST 2021


On Tue, 13 Apr 2021, Maurizio Berti wrote:

> - The MVC pattern is a bit different from the "Qt point of view", due to
> the way the library works. In general, they are much less separated than
> some other frameworks, and it's common to have both the view and the
> controller contained in the same object (a display object, a class that
> inherits from QWidget or its subclasses). For data models it's even more
> "strict": in substance, it is just "Model/View", as both the view and the
> controller are actually combined in what are called "item views"
> (QListView, QTableView, QTreeView, all of them being Qt widgets inheriting
> from QAbstractItemView); both the view and controller parts are also
> partially managed through what is called an "item delegate", which is
> responsible of displaying the data of each model index in a (possibly)
> human readable form, and providing appropriate editors whenever required,
> while interfacing with the model when data is being committed. Qt even
> provides higher level views (QListWidget, QTableWidget, QTreeWidget), which
> provide only simple interfaces to the underlying model, both for the
> programmer and the user.
>
> I suggest you to take your time and read more about this topic:
> https://doc.qt.io/qt-5/model-view-programming.html

Maurizio,

Thank you. This answers my questions.

Stay well,

Rich


More information about the PyQt mailing list