Dan O
Dan O

Reputation: 4450

QAbstractItemModel for QMetaObject, do I have to write it myself?

A suite of data models built on top of Qt's reflection system seems like a natural synergy, but I haven't found such a beast in the Qt library itself or from a 3rd party. Does anyone know if such a thing exists?

I'm look for data models for editing and displaying a collection of QObjects QMetaObject properties. I can kind of understand why this isn't included in the Qt library (as it would not be possible to expose all of QMetaObject in a clean way) but I'm hoping I don't have to write a bunch of data models and proxy models to display the hierarchies and properties of QObjects.

Upvotes: 1

Views: 228

Answers (1)

Arnold Spence
Arnold Spence

Reputation: 22282

If you are representing a tree of QObjects then QStandardItemModel will probably suit your needs. If not, you would probably subclass that instead of QAbstractItemModel.

Upvotes: 2

Related Questions