[Interest] White background of QLabel

Lorenz Haas lykurg at gmail.com
Thu Feb 13 07:09:05 CET 2014


Hi,

You also have to use QWidget::setAutoFillBackground():

label->setAutoFillBackground(true);

Cheers

> Hi.
> 
> How to set white background to the QLabel?
> 
> I use the next code to do it:
> 
> QLabel * label = new QLabel( this ); 
> label->setBackgroundRole( QPalette::Base );
> 
> But it give no effect. What I should do else? Thanks.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 




More information about the Interest mailing list