How to get margins and background colour of QTreeItemViews selected item?
-
In another widget I need to know the background colour and margins of a specific item in a QTreeView. How would I do that? I tried QTV::style() but this did not lead to much.
-
try to get
@QStyleOptionViewItem4 option;
option.initFrom(treeView);@in a slot receiving a model index
-
Thanks, and where is the model index used in your example?