O'Reilly logo

An Introduction to Design Patterns in C++ with Qt™, Second Edition by Paul Ezust, Alan Ezust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13: Models and Views

A model-view design framework provides tools and techniques for separating the set of underlying data classes (the model) from the set of classes that present the user with a GUI (the view). Models typically organize the data, which can be tabular or hiearchical. In this chapter, we will show how to use the model classes in Qt to represent many different kinds of data.

In several earlier examples, you saw code that attempted to keep a clean separation between model classes that represent data and view code that presented a user interface. There are several important reasons for enforcing this separation.

First, separating model from view reduces the complexity of each. Model and view code have completely different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required