View Full Version : Removing a dotted selection line thing in a QListWidget?

16th August 2010, 21:33
Compare these two images:


How do I get that dotted line to disapear (like the first image), using stylesheets?


Also, in a QListWidgetItem, with checkboxes, how do I stylesheet the checkbox to show something when hovered?

I can get the entire QListWidgetItem to show something on hover, but not just the checkbox.

The obvious: 'QListView::indicator:hover' doesn't work. Also, 'QListView::indicator:checked:hover' doesn't work either.

16th August 2010, 22:03

The last few posts are from 2010.

17th August 2010, 02:42
Thank you for the response.

So (according to the posts you linked to) I can't do it, soley with stylesheets? That's disapointing. Thanks for resolving that for me, though,

2nd August 2013, 22:53
I know that this thread is old, but i hate when the simplest solution is not even proposed...

This can be done by simply setting QListWidget::focusPolicy to NoFocus.

Job done!