V
V
Victor Potebenko2020-11-09 23:05:26
PyQt
Victor Potebenko, 2020-11-09 23:05:26

How the model/view works. in pyqt5?

Explain to a newbie in PyQt5 how the model/view architecture works and how to use it. I know the basic elements, working with signals and slots, but I can’t understand the new (for me) concept myself. If you do not want or do not know how to explain, give links to resources where this is explained in simple language. Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2020-11-10
@bbkmzzzz

Off C ++ docks - Everything is fine, the language should not be embarrassing, the methods / signals are the same
The wiki briefly describes the MVC concept
In a nutshell:
MVC is about separating business logic and interface, the view shows data, the controller reacts and processes user actions, the model operates with data and logic, passes data to the view.
In Qt, the view and controller are combined into one, the controller is in the view. The view handles input events, the controller sends signals, and the model responds to signals.
Understand how QTableWidget works, for example. This is a widget that combines QTableView and QAbstractTableModel. Understand how it works, you can go directly to the view and model, and poke them

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question