Results 1 to 2 of 2

Thread: Styling QAbstractScrollArea / QListWidget

  1. #1
    Join Date
    Jun 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Styling QAbstractScrollArea / QListWidget

    Hello, I am having a small problem styling Scroll Areas.

    The attached picture should demonstrate what I am talking about. When there is only a vertical scroll bar showing, the small box that would normally sit in the corner between the 2 Horizontal and vertical scrollbars is visible, and offset downwards so as to obscure the border.

    I have a border-width set on QFrame, and this object looks to be a QFrame, and is inheriting that border-width. cant seem to find a way of selecting this box to set its border-width. It seems to be positioned ok when there are both scroll bars.

    QWidget>QListWidget
    {
    border-width: 0px;
    }

    the above works, but also removed the border from the QListWidgets display frame, that contains the items.

    Any suggestions ?

    Thanks

    Rob.
    Attached Images Attached Images
    Last edited by rmwatson; 26th June 2010 at 23:59.

  2. #2
    Join Date
    Jun 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: Styling QAbstractScrollArea / QListWidget

    As a follow up to this, another problem I have with QComboBox is when it is editable, the inner QLineEdit seems to sit onto of the underlying frame that is the editable combo box. This Means it clips the border underneath. (see attached)

    this only happens with various colour combinations. As a solution I am setting the Alpha to 254 , which seems to fix this one.

    Any idea why this is happening?

    Good ->


    QComboBox::editable
    {
    border:1px solid rgb(41,41,41);
    background: rgba(107, 107, 107, 254);
    }

    Bad ->

    QComboBox::editable
    {
    border:1px solid rgb(41,41,41);
    background: rgba(107, 107, 107, 255);
    }
    Attached Images Attached Images

Similar Threads

  1. Replies: 0
    Last Post: 30th April 2010, 05:22
  2. QAbstractScrollArea metrics
    By Olivier Berten in forum Qt Programming
    Replies: 0
    Last Post: 1st February 2010, 08:18
  3. QScrollArea vs. QAbstractScrollArea
    By zaphod.b in forum Qt Programming
    Replies: 15
    Last Post: 7th July 2009, 15:26
  4. QAbstractScrollArea::setViewportMargins() not working :(
    By montylee in forum Qt Programming
    Replies: 7
    Last Post: 21st January 2009, 15:52
  5. QAbstractScrollArea and paintEvent
    By babu198649 in forum Newbie
    Replies: 13
    Last Post: 4th August 2008, 10:56

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.