[Qt-interest] Problem with background-image + parent widget
Tr3wory
tr3w at freemail.hu
Sun May 24 12:44:51 CEST 2009
Hi!
In my previous letter, I made a mistake.
So, In designer, everything is fine.
When I use this widget with or without parent, it did not show the
background image.
After that I set the palette of a widget, and autoFillBackground by
hand like this:
QPalette p=palette();
p.setBrush(QPalette::Window, QPixmap("background.png"));
setPalette(p);
setAutoFillBackground(true);
If I use my widget without parent, it works. When I use with parent,
it do not work...
I don't understand at all...
On Sun, May 24, 2009 at 12:22 PM, Tr3wory <tr3w at freemail.hu> wrote:
> Hi!
>
> I created my widget with the designer. I set an background image in
> its stylesheet.
> When I use this widget without parent (i.e. new window) everything works fine.
>
> When I use with parent (with a StackedWidget, or just a plain
> QWidget), it did not show the background image.
>
> It is a bug, or a feature?
> How can I change this?
>
> tr3w
>
More information about the Qt-interest-old
mailing list