hi
i have compiled an application statically and it has to set its background with image which is present in the file system.
this is done like this
palette.
setBrush((this)->backgroundRole
(),
QBrush(pixmap
));
(this)->setPalette(palette);
QPalette palette;
QPixmap pixmap = QPixmap("./icon/slide1.jpg");
palette.setBrush((this)->backgroundRole(), QBrush(pixmap));
(this)->setPalette(palette);
To copy to clipboard, switch view to plain text mode
but it does not work if the program is compiled statically.
but the same program compiled dynamically (using dynamic libraries) works.
i am sure that there is no problem with path in which images are present.
do compiling statically requires any modification.
Bookmarks