[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Properties in PyQt5
From: Glenn Ramsey <gr () componic ! co ! nz>
Date: 2014-09-24 4:51:59
Message-ID: 54224DEF.8060102 () componic ! co ! nz
[Download RAW message or body]
On 24/09/14 16:37, Florian Bruhin wrote:
> * Glenn Ramsey <gr@componic.co.nz> [2014-09-24 16:03:30 +1200]:
>> Hi,
>>
>> I have a dialog that has been created in Qt Designer and I would like to
>> be able to set a red border on a QLineEdit based on its contents (or lack thereof).
>>
>> Below is what I have tried, based on the PyQt4 version in Mark Summerfield's
>> book "Rapid GUI programming with Python and Qt", but it doesn't work.
>
> It'd be useful if you said which page/snippet so I could take a look
> at that as well ;)
It's on pages 322-323.
>
>> What have I done wrong here?
>
> AFAIK you need to call setStyleSheet again after a property changed.
> I do something like this (from memory, untested):
>
Yes, that was it, thanks. It's working now, and I now see the piece of
information I was missing is on p324.
Glenn
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic