Book Image

Application Development with Qt Creator - Second Edition

Book Image

Application Development with Qt Creator - Second Edition

Overview of this book

Table of Contents (20 chapters)
Application Development with Qt Creator Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Graphics View Framework


Qt provides a separate view framework, the Graphics View Framework, to draw hundreds or thousands of relatively lightweight customized items at once. You will choose the Graphics View Framework if you're implementing your own widget set from scratch (although, you might want to consider Qt Quick for this as well), or if you have a large number of items to display on the screen at once, each with their own position and data. This is especially important for applications that process and display a great deal of data, such as geographic information systems or computer-aided design applications.

In the Graphics View Framework, Qt defines the scene, responsible for providing a fast interface to a large number of items. (If you remember our discussion of MVC from the previous chapter, you can think of the scene as the model for the view renderer.) The scene also distributes events to the items it contains and manages the state of individual items in the scene. QGraphicsScene...