[ fromfile: modelview-questions.xml id: modelview-questions ]
What are model classes? What are view classes? What relationship should be maintained between them?
What tools are provided by Qt to work with models and views?
What is MVC?
What is controller code? Which Qt classes are controller classes?
Code which creates, destroys, or connects objects together is considered controller code. QApplication and QAction are both containers for controller code, but the ItemDelegate is also considered a controller.
What are delegates? Where are they found?
In relation to delegates, what are roles?
How do you determine what item(s) is/are selected in a QListView?
Each view has a SelectionModel which can describe which item(s) are selected in a view.
If you want to iterate through items in an QAbstractItemModel, what would be a good class to use?
QModelIndex is a "cursor", or an indirect reference to data in a model. This can be used to iterate through items in the model.
There are two hierarchies of classes for storing and displaying tree-like data: *Widget/Item and *ItemModel/View. What reasons might you have for using one rather than the other?
Why would you use the QStandardItemModel rather than the QAbstractItemModel? Or vice versa?
StandardItemModel holds onto the data, while an abstract model can be a proxy for data elsewhere. StandardItemModel can lead to duplication of data. It is recommended to implement abstract methods from an AbstractItemModel for custom models.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |