ale6111
2nd August 2010, 16:34
Hi,
I have a strange problem with an application, I set a background in this way:
QPalette palette;
palette.setBrush(QPalette::Window, QBrush(QImage("image.jpg")));
this->setPalette(palette);
I compiled on my pc and all work good.
Then I compiled on another pc and I get a black background.
If I set only a color as background in this way:
palette.setBrush(QPalette::Window, QBrush(Qt::cyan, Qt::SolidPattern));
all work good on both pc.
I thought a problem with path, but i try with absolute and I have the same result.
Both are linux system.
The first pc uses Qt version 4.6.2, GNOME and it's a 32 bit, the second uses Qt 4.6.3, KDE4 and it's a 64bit.
I really can't understand, help me.
Thanks.
I have a strange problem with an application, I set a background in this way:
QPalette palette;
palette.setBrush(QPalette::Window, QBrush(QImage("image.jpg")));
this->setPalette(palette);
I compiled on my pc and all work good.
Then I compiled on another pc and I get a black background.
If I set only a color as background in this way:
palette.setBrush(QPalette::Window, QBrush(Qt::cyan, Qt::SolidPattern));
all work good on both pc.
I thought a problem with path, but i try with absolute and I have the same result.
Both are linux system.
The first pc uses Qt version 4.6.2, GNOME and it's a 32 bit, the second uses Qt 4.6.3, KDE4 and it's a 64bit.
I really can't understand, help me.
Thanks.