Skip to content
nucularmoo edited this page May 15, 2018 · 5 revisions

Custom QObjects (P0 | 3h)

Tino: Using C++ models in QML

Explanation of the contents of a topic page @ Topic reference page

Back to Week 4

Objective: Creating and using custom models in QML (3.05) / Learn how to create QML compatible item models

Tino: Learn how to create QML compatible item models

Tino: This should replace 3.04 and 3.05. I would put both here.

Erika: Copyed stuff over from 3.04 and 3.05

Beginner

  • What is an abstract item model?
  • What is standard item model?
  • Why create a custom model instead of using a standard item model?

Intermediate

  • What is needed in the simplest custom model? (Tino: rowCount() and data())
  • How to make a model writable?
  • What is require for a custom editable model?
  • How to map table columns to named roles?
  • What is abstract item model index?
  • What is abstract item model role?
  • What is QML model named role?
  • How to map abstract item model index to a need role?
  • What is the purpose of roleNames() function in abstract item model?
  • What is required to make an abstract model writable?

Expert

Omitted


Course material content

Instructions and description for the exercise of the topic


Exhaustive reference material mentioned in this topic

Further reading topics/links:

Clone this wiki locally