Hello,
I have a treewidget in my Qt form. It shows a tree of files, showing a icon representing something about them, and their name.
I entered these using treeItem->setIcon(0, *icon)
, and treeItem->setText(0, text)
.
The reason I entered both values to the same column (0), is because otherwise the icons would not stay next to the text, rather always stick to the left, even when the text was indented to the right (because it's a child of another item).
The problem is, now I can't tell if the user clicked on the icon or on the text itself, and I need to deal with these separately.
So, is there anyway to get more info than just the treeitem and column when an object in a treewidget is clicked, or is there any way to put them on seperate columns and still have the normal behavior icons and text should have?
Thanks.