PDA

View Full Version : Incorrect background of checkbox on maind window with background image



dpatel
5th April 2011, 14:36
Hi,

I have a main window with black background image. On it I place a checkbox with transparent round background image both for checked and unchecked states. I am expecting that the corners of checkbox's background image would be transparent since the image is transparent. But I see that corners have black background. and it seems that the background image of the mainwindow but drawn with respect to the size of checkbox.

I have set following stylesheets.

For Main Window


border-image: url(:/res/bg.png);


For checkbox


QCheckBox::indicator:unchecked
{
image: url(:/res/btn_off.png);

}

QCheckBox::indicator:checked
{
image: url(:/res/btn_on.png);
}


Please let me know what am doing wrong here?
Thanks