+ enum myRoles {
+ SortRole = Qt::UserRole,
+ UserRole
+ };
+
+ TreeModel(const QList<QVariant> &, QObject *parent = 0);
+ virtual ~TreeModel();
+
+ virtual QVariant data(const QModelIndex &index, int role) const;
+ virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+
+ virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;