TreeView Hide Column hides the expand / collapse icon and prints plain Table
-
wrote on 15 Nov 2016, 16:41 last edited by
Hi there,
i have a TreeView which i populate with some data. In the first column i have stored some data i need the whole time, so it makes sense to fill the data there. Because the data should not be visible to the user i hide the column via ui->treeView->setColumnHidden(0, TRUE); which works, but there is a big problem: this command hides the expand / collapse arrow symbol and the Tree Structure, too. I now got a plain table list, which is very bad.
Is there any way to hide the column without changing the Tree-Structure and the icon?
I solved it temporarly by storing the data into the last column of my TreeView and hide this column, which works as expected, but maybe there is an easier solution for this?
-
wrote on 16 Nov 2016, 06:51 last edited by
Unfortunately no. QTreeView assumes only the first column has children and base everything off that one
-
wrote on 16 Nov 2016, 12:30 last edited by
Good to know, so my solution to store this in the last column and hide this one is the best solution for me.
1/3