PDA

View Full Version : Styling QAbstractScrollArea / QListWidget



rmwatson
26th June 2010, 20:20
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.

rmwatson
26th June 2010, 23:57
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);
}