Search code examples
c++qt4

Model View Presenter for Qt C++ development


Can somebody point me to a good tutorial or sample project where MVP pattern has been implemented using Qt C++. I'm new to Qt as I come from VB.NET background. MVP is pretty common in VB.NET. Doing a Google search was not so fruitful either. Please somebody show me some real world example. Like in VB.NET we create complex model with IList of some base model. All these things are important. And what relevant data structures should be used where we used the Collection class for example.


Solution

  • To learn MVP, I suggest reading Michael Feather's article "The Humble Dialog Box":

    webarchive link

    (This is one specific form of MVP, there are other variants possible.)

    The examples in that article are made with C++. There are not made with Qt, but more or less independent of the GUI framework. MVP is about the separation of your code into a framework dependent part and a framework-independent part, which can be learned by using almost any GUI framework.