[Qt-interest] QLineEdit font color based upon QValidator status

lbutler3 lbutler3 at comcast.net
Sun Feb 6 04:05:24 CET 2011


When QtCreator asks for a directory to put the project in the QLineEdit displays text in red whenever the input is invalid.  I'd like to do something similar in my application.  I have a QValidator-derived class assigned to my QLineEdit that can determine the status of the input, but what is the "right" way to get the QLineEdit to change font color based upon this status?  

Lee


More information about the Qt-interest-old mailing list