Hello!
I've got QTreeView and QStandardItemModel. There are items in this model based on QStandardItem:
{
public:
const TElement *getElement() const;
void setElementData(const TElement & element);
private:
TElement *m_pElement; //string and integer members in class TElement
}
class TComplexItem : public QStandardItem
{
public:
const TElement *getElement() const;
void setElementData(const TElement & element);
private:
TElement *m_pElement; //string and integer members in class TElement
}
To copy to clipboard, switch view to plain text mode
It's now necessary to add to the window with QTreeView some controls for representation data from m_pElement. So when we walk though the tree we should get the appropriate data for current item in these controls.
How could I do this? It looks like QDataWidgetMapper. But QDataWidgetMapper itself doesn't fit here.
Thanks in advance for any ideas.
Bookmarks