[Qt-interest] QLineEdit background same as QFrame

Neel Basu neel.basu.z at gmail.com
Mon May 18 19:47:59 CEST 2009


I've a QFrame and in that I've a QLIneEdit
default background color of QLineEdit is white
but I want to make its background color the default background color of the 
window.
I've tried the following things but none of them worked.
ui->toEdit->setBackgroundRole(QPalette::Window);


ui->toEdit->setStyleSheet("background-color: "+QVariant(ui->toEdit-
>palette().brush(QPalette::Window)).toString());

They did not work. background color of the QLineEdit is still white

any idea ??

Thanks
Neel



More information about the Qt-interest-old mailing list