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@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest