homerun4711
17th February 2011, 14:50
Hello!
I use a stylesheet to draw a red border around QLineEdits if the QValidator fails. So far this works fine. But I could not figure out how to reset the stylesheet to the default one. The style is returned to its default on a valid input, but not if the field is emptied.
I read somewhere that one could use
lineEdit->setStyleSheet(styleSheet());
but this does not work...
Do you know how I can fix this?
Kind regards,
HomeR
I use a stylesheet to draw a red border around QLineEdits if the QValidator fails. So far this works fine. But I could not figure out how to reset the stylesheet to the default one. The style is returned to its default on a valid input, but not if the field is emptied.
I read somewhere that one could use
lineEdit->setStyleSheet(styleSheet());
but this does not work...
Do you know how I can fix this?
Kind regards,
HomeR