[Qt-interest] How to set all button's background except one whose x()=100?

Kermit Mei kermit.mei at gmail.com
Wed Jul 8 08:59:24 CEST 2009


On Wed, 2009-07-08 at 08:28 +0200, Lars Amsel wrote:
> Kermit,
> 
> Kermit Mei wrote:
> > Hello,community!
> > I want to set all the buttons on a widget, but except the one whose x()
> > is always 100. How to write the .css syntax?
> > 
> > For example,
> > QPushButton[x=100] {border-image: url(:/images/key.png); }
> > but, now the x!=100.
> 
> This selectors only works for Qt Properties. The Property is not x but 
> geometry. So this probably wont work. I just don't know whether this works at 
> all for properties like geometry in any way.
> But you could set a custom property. See: 
> http://doc.qtsoftware.com/4.5/stylesheet-examples.html#customizing-using-dynamic-properties
> 
> regards
> 
> Lars

Thanks, Lars.





More information about the Qt-interest-old mailing list