Chapter 7: Model View Programming
Model/View programming is used to separate data from Views in Qt to handle datasets. The Model/View (M/V) architecture differentiates the functionalities that give freedom to the developers to modify and present the information on the User Interface (UI) in multiple ways. We will discuss each component of the architecture,the related convenience classes offered by Qt, and how to use them with practical examples. Throughout this chapter, we will be discussing the Model View pattern and understand the underlying core concepts.
In this chapter, we will discuss the following topics:
- Fundamentals of the M/V architecture
- Using Models and Views
- Creating custom Models and delegates
- Displaying information using M/V in Qt Widgets
- Displaying information using M/V in QML
- Using C++ Models with QML
By the end of this chapter, you will be able to create a data model and display information on a customized UI. You will be able...