I'm a newbie with the Model/View programming of Qt and have read the Editable Tree Model Example in the Qt documentation. In this example a single object (TreeItem) encapsulates two pieces of information that later are displayed in a single row containing two columns (name and description) thanks to overriding of QModelIndex QAbstractItemModel::index() and QVariant QAbstractItemModel::data().

I have a custom class (e.g. Foo) containing two pieces of information (Foo::m_name and Foo::m_description) that I want to display in a single row containing two columns, but instead of subclassing QAbstractItemModel I want to subclass QStandardItemModel because it has some much functionality. However, it seems I must create two QStandardItem objects, one to edit/display m_name and another to edit/display m_description. Is there some standard design scheme to manage a single Foo object in memory while having more than one QStandardItem object to handle different attributes of Foo?