[SOLVED]QTreeWidget position of columns
-
Hello,
I have a QTreeWidget with some items in 4 columns, from index 0 to 3.
I want to have the position of where the last column starts (x position).I tried
@treeWidget->topLevelItem(0)->child(3) but this has no pos() method available.@
How could I acheieve that?
Cheers,
-
Hi,
What do you mean by x ? the pixel coordinate ?
-
Hello SGaist,
Yes the pixel coordinate. The same as pos().x() on, a widget ;)
Cheers -
Then you can try visualRect(const QModelIndex &)
-
Yes :)
I also found :@treeWidget->header()->sectionPosition(3);@
which might be the easiest way to go ;)
Thanks SGaist
-
This post is deleted!