#ifndef TREEITEM_H #define TREEITEM_H #include #include class TreeItem { public: explicit TreeItem(const QList &data, TreeItem *parentItem = 0); ~TreeItem(); void appendChild(TreeItem *child); TreeItem *child(int row); int childCount() const; int columnCount() const; QVariant data(int column) const; int row() const; TreeItem *parentItem(); private: QList m_childItems; QList m_itemData; TreeItem *m_parentItem; }; #endif // TREEITEM_H