OK.
I read about QTreeView... and don't find any simple answer. What i need to do is make a tree trom data stored in table
NAME | ParaneID | ID | Description
foo | 0 | 1 | Some entry
bar | 1 | 2 | another entry
NAME | ParaneID | ID | Description
foo | 0 | 1 | Some entry
bar | 1 | 2 | another entry
To copy to clipboard, switch view to plain text mode
name DESC
|-> FOO Some entry
|-> BAR another entry
name DESC
|-> FOO Some entry
|-> BAR another entry
To copy to clipboard, switch view to plain text mode
I need to store in my model Name, description and ID. In QTreeWidget I create a item, setText (0,name); (1,ID); (2,desc) and add the item as root (if parent = 0) or as a child of different entry. How can I do it with QStandardItemModel? Only thing I found is an example where are entries with children having only one column... I need multiple columns in children.
Bookmarks