Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Mac-style tree widget selection in windows-based project.
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?
tucnak last edited by
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.
Can anybody help me? Any ideas?
goetz last edited by
Maybe you could write your own item delegate an reimplement the paint methods there. I would start with subclassing [[Doc:QStyledItemDelegate]].
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.
andre last edited by
A style sheet should do the trick, I think.