Model-View-Presenter(MVP) Design Pattern in Qt Application

From Qt Wiki
Revision as of 07:33, 13 April 2016 by Satyendra (talk | contribs) (First Notes on Qt App with MVP Design Pattern)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Can we implement MVP(Model-View-Presenter) design pattern using Qt's Signal and slot mechanism.

We will try to create a Qt application with MVP design pattern.

First of all What is MVP design pattern? MVP is a user interface architectural pattern engineered to facilitate separation of logic out of the view and into the presenter.

First we refer to existing documentation about Model-View-Presenter.MVP Wiki documentation says like this. a)The Presenter is common to multiple views. b)The model is an interface defining the data to be displayed or otherwise acted upon in the user interface. c)The View is kept as thin and ignorant as possible.

In MVP the presenter assumes the functionality of the "middle-man". In MVP, all presentation logic (Signal and slots and connect statements)is pushed to the presenter class.

Remaining views only has the implementation to display the widget.