PDA

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



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

http://img822.imageshack.us/img822/7391/comparisonr.png

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.

Urthas
16th August 2010, 22:03
http://www.qtcentre.org/threads/10099-How-to-remove-the-dotted-rectangle-of-selection

The last few posts are from 2010.

ComServant
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,

cdebel2005
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!