4. Model/View Tree Models

This chapter covers model/view tree models, and assumes a basic familiarity with Qt’s model/view architecture, as described at the beginning of the previous chapter (88 image).

In this chapter we will look at tree models. In the first section we will cover using a QStandardItemModel subclass with its items held in a QStandardItem subclass. (In the previous chapter we used QStandardItems as is.) And in the second section we will replace the QStandardItemModel with a custom model. Just as with the table model examples in the previous chapter, we will see ...

Get Advanced Qt Programming: Creating Great Software with C++ and 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.