Chapter 13.  Models and Views

Table of Contents

13.1. Model-View-Controller (MVC)
13.2. Qt Models and Views
13.2.1. QFileSystemModel
13.2.2. Multiple Views
13.2.3. Delegate Classes
13.3. Table Models
13.3.1. Standard or Abstract?
13.3.2. Editable Models
13.3.3. Sorting and Filtering
13.4. Tree Models
13.4.1. Trolltech Model Testing Tool
13.5. Smarter Pointers
13.6. Exercises: Models and Views
13.7. Review Questions

[ fromfile: modelview.xml id: modelview ]

Abstract

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.

Figure 13.1.  Widgets and Views

Widgets and Views