0

I use this in Qt 4.

The code for both:

QPushButton#groupBoxTitleExpand
{
    min-height: 25px;
    max-height: 25px;
    border-style: solid; 
    border-width: 0px 17px 0px 3px;
    border-image: url(:/image.png) 0 17 0 3 fill repeat;
} 

QPushButton#groupBoxTitleExpand:checked 
{ 
    min-height: 31px;
    max-height: 31px;
    border-width: 0px 17px 6px 3px;
    border-image: url(:/resources/images/widgets/image.png) 0 17 6 3 repeat;
}

The button when it is CHECKED never changes.

The image has a part in the botton (the 6 pixels) , which is removed and not showed when the button is not checked. Then , when i check the button that part appears. But what happens is that it still has the 25 size, and shows the 6 pixels in the bottom.

So obviously what´s happening is that the 31px doesn´t work. In fact, i tried 200px and stays the same....

Here is the image. As you can see the bottom has a shadow i want to hide when it´s not checked.

The image im using

And here what happens. The first works ok. The second get´s that problem. Should be perfect! as the original image. I used this site http://border-image.com/ to check it, and works.

The result

Darkgaze
  • 2,280
  • 6
  • 36
  • 59
  • 1
    I don't use Qt but I don't think `:checked` makes sense for a button. Did you mean `:active` and/or `:focus`? – BoltClock Mar 07 '13 at 12:56
  • Actually a button can be made *checkable* so that it can be *toggled*. – scai Mar 07 '13 at 13:46
  • Yes. It is checkable... But the thing is IT´S working, it changes between checked and not checked. But the size property is ignored in the second one. What would you use? – Darkgaze Mar 08 '13 at 08:53

0 Answers0