I would like to use a stylesheet :focus pseudo-state to control the representation of the Tree view’s focus state. Using the following stylesheet works well, except that the Qt system still draws it’s own focus rect. How do I ask Qt to not draw the focus rect, while still being able to focus the control for keyboard input?
QTreeView {
background: #505050;
border: 1px solid;
border-radius: 10px;
}
QTreeView:focus {
border: 2px groove;
}
The focus rect around the QTreeView widget itself turns out to be a Mac styling feature. This turns it off per widget: