Results 1 to 1 of 1

Thread: How to remove selection border in QListWidget?

  1. #1
    Join Date
    May 2018
    Posts
    1
    Qt products
    Qt5

    Default Re: How to remove selection border in QListWidget?

    I apply CSS to a QListWidget, however I get a dotted selection border around the text.

    I'm using this CSS:

    QListWidget {
    background-color: white;
    show-decoration-selected: 0;
    padding:0;
    margin:0;
    }

    QListWidget::item:selected {
    border-left: 3px solid #f00;
    border-top:none;
    border-right:none;
    border-bottom:none;
    background: #0f0;
    }

    QListWidget::item:selected:active {
    background: #0f0;
    border-left: 3px solid #f00;
    border-top:none;
    border-right:none;
    border-bottom:none;
    }

    QListWidget::item:selected:!active {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
    stop: 0 #ABAFE5, stop: 1 #8588B2);
    }

    Sin tÃ*tulo.png

    Thank you.


    Added after 6 minutes:


    https://stackoverflow.com/questions/...in-qlistwidget
    Last edited by Cthulhu-28; 27th May 2018 at 02:34.

Similar Threads

  1. Replies: 2
    Last Post: 21st March 2012, 14:30
  2. How to remove the border?
    By P@u1 in forum Newbie
    Replies: 1
    Last Post: 21st June 2011, 23:42
  3. How to remove QMainWindow's title and border
    By meraj ansari in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2010, 17:22
  4. Replies: 0
    Last Post: 13th February 2009, 08:26
  5. Remove Widget Border?
    By winston2020 in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2008, 05:26

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.