I\'m trying to change the background color of the QLineEdit and I can\'t figure it out at all.
QLineEdit
I tried using stylesheets originally like th
stylesheets
You can set the background and text colors of line edit by setting the palette like :
QLineEdit *le = new QLineEdit(); QPalette palette; palette.setColor(QPalette::Base,Qt::black); palette.setColor(QPalette::Text,Qt::white); le->setPalette(palette);