Chapter 17. Models and Views
The Model-View pattern describes techniques of separating the underlying data (the model) from the class that presents the user with a GUI (the view). In this chapter we will see a model for a form, and a couple of ways to view and enter data into it. Qt model and view classes are discussed, and we will see examples of lists, trees, and tables.
M-V-C: What about the Controller? | ||
Dynamic Form Models | ||
Qt 4 Models and Views | ||
Table Models | ||
Tree Models |
In several earlier examples we saw code that maintained a clean separation between model classes that represent data and view code that presents a user interface. There are several important reasons for enforcing this separation.
First of all, separating ...
Get An Introduction to Design Patterns in C++ with Qt 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.