13.7.  Review Questions

[ fromfile: modelview-questions.xml id: modelview-questions ]

  1. What are model classes? What are view classes? What relationship should be maintained between them?

  2. What tools are provided by Qt to work with models and views?

  3. What is MVC?

  4. What is controller code? Which Qt classes are controller classes?

  5. What are delegates? Where are they found?

  6. In relation to delegates, what are roles?

  7. How do you determine what item(s) is/are selected in a QListView?

  8. If you want to iterate through items in an QAbstractItemModel, what would be a good class to use?

  9. 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?

  10. Why would you use the QStandardItemModel rather than the QAbstractItemModel? Or vice versa?