On Thu, 05 Feb 2009 08:25:30 -0500, Matt Smith
wrote:
> You've told me this before, but I didn't quite follow what was buggy.
>
> pal = QtGui.QPalette(MyLineEdit.palette())
> pal.setColor(QtGui.QPalette.Base,QtGui.QColor('red'))
> MyLineEdit.setPalette(pal)
>
> It seems that .palette() is return
You've told me this before, but I didn't quite follow what was buggy.
pal = QtGui.QPalette(MyLineEdit.palette())
pal.setColor(QtGui.QPalette.Base,QtGui.QColor('red'))
MyLineEdit.setPalette(pal)
It seems that .palette() is returning a const and I shouldn't modify it.
What about .parent()? should
On Thu, 05 Feb 2009 07:50:57 -0500, Matt Smith
wrote:
> You could use the palette.
>
>
> MyLineEdit.palette().setColor(QtGui.QPalette.Base,QtGui.QColor('red'))
That's buggy as palette() returns a const. You need to make a copy of the
returned palette and modify that. See the roadmap.
Phil
You could use the palette.
MyLineEdit.palette().setColor(QtGui.QPalette.Base,QtGui.QColor('red'))
mbs
On Thu, 2009-02-05 at 12:00 +, pyqt-requ...@riverbankcomputing.com
> Le 5/2/2009, "Knapp" a crit:
>
> >I have a qlineedit that I want to turn the background red when the
> >input is bad
- Original Besked
Fra: Knapp
Til: Frédéric
Cc: pyqt@riverbankcomputing.com
Emne: Re: [PyQt] set qlineedit red, easy?? SOLVED
Dato: 05/02/09 13:11
> On Thu, Feb 5, 2009 at 12:50 PM, Frédéric
> <frederic.mantega...@gbiloba.org> wrote:
> >
> > Le 5/2
On Thu, Feb 5, 2009 at 12:50 PM, Frédéric
wrote:
>
> Le 5/2/2009, "Knapp" 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.
Le 5/2/2009, "Knapp" 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 {
backgrou
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.
Thanks.
--
Douglas E Knapp
Amazon Gift Cards; let them choose!!
http://www.amazon.com/gp/