I'm trying to remove the dotted border on the text in this QListView::item using stylesheets:

I've tried variations of border: 0 and show-decoration-selected: 0 on QListView, QListView::item and QListView::item::text to no effect.
I'm using PyQt, but I believe the stylesheet rules are the same as in the C++ libraries.
After some more testing, I found that the following stylesheet works:
QListView {
outline: 0;
}
Setting "outline: 0;" in the stylesheet doesn't work for me (anymore?). The only solution I could find was to set the ListView's FocusPolicy to "Qt::NoFocus", which comes with obvious drawbacks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With