[Qt-interest] Problem with setting the top level window background picture
qiang zhang
liubingzhq at gmail.com
Mon Feb 28 08:28:05 CET 2011
Hi,
int main( int argc, char ** argv )
{
QApplication app(argc, argv);
QWidget w;
w.setAutoFillBackground(true);
QPalette palette;
palette.setBrush(QPalette::Window,
QBrush(QPixmap("./default.jpg")));
w.setPalette(palette);
w.show();
return app.exec();
}
I want to use qpalette to set the background picture. As above the result is
that the background picture just has a flicker and then turn back gray.But
when I resize a window by dragging its top or left borders (and only those),
the content of the window is drawn with a slight lag, and the background
picture appears briefly on the bottom (respectively right) side the window,
filling the gap created by the resizing.
The same program run on some other machine is as expected. I don't know
why.
Can some one help me? Thanks in advanced.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110228/c5d76938/attachment.html
More information about the Qt-interest-old
mailing list