[PyQt] Style sheets and dynamic properties
matt_ovens at hotmail.com
Mon Oct 13 13:47:48 BST 2008
I realise there is another thread on this subject, but the
problem there seemed to be different (application of the style sheet on
changing the property rather than setting it initially). I'm trying to
use setProperty() to set a dynamic property on a QTreeWidget which I
can then use as a specifier in a style sheet. On the widget I'm doing:
self.setProperty( "locked", QtCore.QVariant(True) )
and then in the style sheet I do:
as far as I can tell the property is never picked up or isn't
evaluating as expected because the style is not applied (other parts of
the style sheet are though, so I know that at least is working). Is
there more to it?
Also, just a little query about styling QTreeWidgetItems - I tried doing:
it doesn't seem to take notice of whether the item has children or not.
That's just a minor thing though and I'll have a closer look at it
Make a mini you and download it into Windows Live Messenger
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt