QTreeView Stylesheet: Changing anything for the ::branch removes the chevron icon
-
This is not something I've encountered before. Just by doing this:
QTreeView#myTreeView::branch:open { border-top: 2px solid #A0A0A0; }
The little opened/closed chevron icon leading every branch disappears (which is the "image"-property). Usually changing a property in the stylesheet does not affect other properties of a widget.
Is there a way to get this default icon back and not having to implement a custom icon now (this introduces a whole lot of new problems)? -
@qwasder85 said in QTreeView Stylesheet: Changing anything for the ::branch removes the chevron icon:
Usually changing a property in the stylesheet does not affect other properties of a widget.
This is not true: "Style sheets are applied on top of the current widget style, meaning that your applications will look as native as possible, but any style sheet constraints will be taken into consideration."
-
@Christian-Ehrlicher You can change, say, the "font" and still keep all other original aspects of a widget. Just as an example.
Or is this depending on which property is being changed? -
@qwasder85 said in QTreeView Stylesheet: Changing anything for the ::branch removes the chevron icon:
Or is this depending on which property is being changed?
meaning that your applications will look as native as possible
It may use the other properties, but it must not. So it depends on what widget you're using and what properties you're changing.
-
@Christian-Ehrlicher I see. It could've been so easy...