Results 1 to 7 of 7

Thread: QListView item with border 0 still visible

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: QListView item with border 0 still visible

    Hi,

    I have same problem. It looks like border is around only text of item. Icon is rendered outside of border. I've tried to play with QListView::text in Qt Style Sheet, but it looks like any changes in QListView::text have no any effects. Can someone help me with it?

    Thank you.

  2. #2
    Join Date
    Jan 2010
    Posts
    18
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QListView item with border 0 still visible

    Several things to try:

    border:none;

    I've had occasions where I'm using stylesheets, but I had to localize some of the settings in the .cpp files. For example:

    ui->setupUi(this);

    this->setStyleSheet("\
    QLabel {\
    color: white;\
    background-color: black;\
    font: bold normal 8pt;\
    border-style: solid;\
    border-width: 1px;\
    border-radius: 8px;\
    border-color: black;\
    padding: 3px;\
    }\
    ");

    leftLayout = new QGridLayout();

    And sometimes I've had to localize style sheet settings to particular objects:

    QLabel * TmpLabel= new QLabel();
    TmpLabel->setStyleSheet(put your settings here);

    Hope this helps.

Similar Threads

  1. QListview set selected item
    By Freeman551 in forum Qt Programming
    Replies: 1
    Last Post: 25th December 2009, 00:17
  2. Add new item to a QListView
    By graciano in forum Newbie
    Replies: 2
    Last Post: 18th August 2009, 18:49
  3. QListView item alignment
    By innerhippy in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2008, 09:32
  4. how to move item up and down in QListView
    By zhanglr in forum Qt Programming
    Replies: 3
    Last Post: 1st August 2008, 14:39
  5. hidden QListView column suddenly visible
    By edb in forum Qt Programming
    Replies: 10
    Last Post: 27th January 2006, 08:00

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.