Results 1 to 4 of 4

Thread: Removing a dotted selection line thing in a QListWidget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Removing a dotted selection line thing in a QListWidget?

    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.

  2. #2
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Removing a dotted selection line thing in a QListWidget?

    http://www.qtcentre.org/threads/1009...e-of-selection

    The last few posts are from 2010.

  3. #3
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Removing a dotted selection line thing in a QListWidget?

    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,

  4. #4
    Join Date
    Mar 2013
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Removing a dotted selection line thing in a QListWidget?

    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!

  5. The following user says thank you to cdebel2005 for this useful post:

    titanius (15th October 2013)

Similar Threads

  1. How to remove the dotted rectangle of selection
    By jiveaxe in forum Qt Programming
    Replies: 5
    Last Post: 18th April 2010, 22:00
  2. QListWidget's selection issues
    By mirni in forum Qwt
    Replies: 0
    Last Post: 5th November 2009, 20:08
  3. Removing the selection of a menu item from QMenuBar
    By febil in forum Qt Programming
    Replies: 2
    Last Post: 18th March 2009, 09:31
  4. Item Selection in QListWidget
    By mclark in forum Qt Programming
    Replies: 2
    Last Post: 12th February 2008, 15:53
  5. QListWidget multi selection
    By user in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2008, 07:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.