[Interest] QWidget style change and reverting it back

Prav pr12og2 at programist.ru
Tue Feb 9 16:31:54 CET 2016


I am trying to change color of QLineEdit with

ui->lineEdit->setStyleSheet("color: red;");

How  that could be that doing the same thing second time I got changed
size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file.


And  how  to  make lineEdit look as it was before using it's setStyleSheet() method?
ui->lineEdit->setStyleSheet("");
does not work for me.

Or using setStyleSheet() is irreversible operation?
If so how to change color of widget and then return it back.




More information about the Interest mailing list