PushButton background not visible
-
hello,
The background color set to pushbutton is not visible since i have put a background image to the form. When i remove the background image of the form, I can see the color of the pushbutton. :(
alfah
-
Hi alfah,
There are several solutions for this depending on your likes.
If you click on the "transparent" tag on the right you will find the ones(FAQ, wiki, topics) on devnet. -
hey eddy
well
as per your suggestion i checked out this link
http://developer.qt.nokia.com/faq/answer/i_change_the_background_color_of_my_child_widgets_but_the_color_does_not_chone of the suggestion is to change set setAutoFillBackground(true). Since this property does not work with stylesheets. I removed the style sheets and added. But i dont see any change. The form has a background image. Is it the reason???
@
QPalette pal = ui->pushButton->palette();
pal.setColor(QPalette::Highlight,QColor("Green"));
ui->pushButton->setAutoFillBackground(true);
@alfah
-
Can you show us some more code? Where and how do you set the image?
-
form's background image is set at the sytesheet of the form usin the designer
-
hello everyone
I found the following link abt the transparecy.
http://doc.qt.nokia.com/qq/qq16-background.htmlShould I set the autofillproperty of each widget to preserve eahc widgets properties so that content propagation does not take place???