How to delete dots from QListWidget?
-
Hi,
I have QListWidget with QWidgets on it ( I use setItemWidget(); ).
Everything is ok, but I would like to have a separate line between items on this list. So I have in my code:
qlist->setStyleSheet( "QListWidget::item { border-bottom:1px solid black; }" );
And it works.
But when I started app I see that the first row have dots around that item. When I change selected row there are that dots in other row. When I delete that line, which set StyleSheet there are no dots.
Picture:
- with css ( there are dots and separate line )
- without css ( no dots and no separate line )
How can I delete dots and have separate line?
-
What you see here is the focus rect which has nothing to do with your css you posted above.
-
@TomNow99 said in How to delete dots from QListWidget?:
why when I don't set css - everything is ok?
Because your default style maybe does not draw a focus rect? Don't know your default style. For css another style is used due to: "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." (https://doc.qt.io/qt-5/stylesheet.html)