On Thu, Feb 5, 2009 at 12:50 PM, Frédéric <[email protected]> wrote: > > Le 5/2/2009, "Knapp" <[email protected]> a écrit: > >>I have a qlineedit that I want to turn the background red when the >>input is bad but I can't seem to find how to do this. I would think it >>would be easy but it does not seem to be. unless I missed something. > > Using a stylesheet? > > css = """QLineEdit { > background-color: red; > }""" > myWidget. setStyleSheet(css) > > I didn't test... > > http://doc.trolltech.com/4.4/stylesheet.html#overview > http://doc.trolltech.com/4.4/qwidget.html#styleSheet-prop > http://doc.trolltech.com/4.4/stylesheet-examples.html#customizing-qlineedit > > -- > Frédéric >
Worked perfectly. I knew it had to be easy and I overlooked the answer! Thanks all. -- Douglas E Knapp Amazon Gift Cards; let them choose!! http://www.amazon.com/gp/product/B001078FFE?ie=UTF8&tag=seattlebujinkand&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001078FFE _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
