can i use an Icon on the QTreeWidgetItem to simulate the QTreeWidgetItem's defalut small triangle on the left of item which can be expanded?
-
No. An item can have both an item icon and the branch indicator, so even if you use an item icon looking like the branch, it will be indented differently.
You can show any branch icons using stylesheets though. Set up an icon for the proper
QTreeView::branch
state. Here's an example. -