Creating the characters entity

We will now go ahead and create a new entity called Characters to be added to entities.pri. Since this entity will be a subclass of a QAbstractListModel, we can use one of Qt Creator's file templates to create it. We will open entities.pri and use Qt Creator's New File or Project... menu. In the template selector, we will choose the Qt Item Model template under the Qt submenu. We'll want to define the following options in the wizard, ensuring that QAbstractListModel is selected as the base class:

Then, in the Project Management step, choose entities.pri as the project to be added to.

The newly created header ...

Get End to End GUI Development with Qt5 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.