On 2012/11/19 04:41 PM, Alex Strickland wrote: Sorry, I should have shown the header:
#include <QAbstractItemModel> #include <QModelIndex> #include <QVariant> typedef struct TreeStruct { QString name; QList<QString> leaves; }; class TreeModel : public QAbstractItemModel { public: TreeModel(); QVariant data(const QModelIndex &index, int role) const; Qt::ItemFlags flags(const QModelIndex &index) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; private: QList<TreeStruct> m_treeData; }; -- Regards Alex _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest