Mac-style tree widget selection in windows-based project.
-
Hi there!
I have windows-based project. But I want to implement tree-widget with selection styles as in mac. Something like that
!http://www1.picturepush.com/photo/a/8505824/img/Anonymous/mac-style-tree-widget.png(mac-style selection in tree widget)!In windows item selection doesn't selection occupy whole item rect. Only the right part with indention.
Can I re-implement such behavior? -
You want to use QTreeView or QTreeWidget?
-
It doesn't depend on. I thought to use QTreeWidget, but If you suggest me solution for QTreeView it will be great.
-
Up.
Can anybody help me? Any ideas?
Thanks -
Maybe you could write your own item delegate an reimplement the paint methods there. I would start with subclassing [[Doc:QStyledItemDelegate]].
@tucnac:
Whether it's a view or a widget is irrelevant as the latter just uses the former and adds a convenience model and some additional methods. -
A style sheet should do the trick, I think.