Qt-interest Archive, May 2008
Strange colours
Message 1 in thread
Hello,
In the constructor of my widget I set a window icon (code follows below).
When shown in the QMessageBox::about() the icon colours are changed
(Red->blue, blue->cyan, etc). This is in Linux; the application icon (in
the window title bar and panel) appears in the correct colours.
I checked the original image files have not become corrupted. I tried to
disable some of the resolutions; the only different behaviour was that when
using only size 16x16 the about box icon was fine and the application icon
had inverted colours.
I had no problem with QT 4.3, this is since setting up QT 4.4.
Have I missed something ? Thanks.
Code as follows:
QPixmap icon128(shine128);
QPixmap icon128a(shine128a);
icon128.setAlphaChannel(icon128a);
QPixmap icon64(shine64);
QPixmap icon64a(shine64a);
icon64.setAlphaChannel(icon64a);
QPixmap icon32(shine32);
QPixmap icon32a(shine32a);
icon32.setAlphaChannel(icon32a);
QPixmap icon16(shine16);
QPixmap icon16a(shine16a);
icon16.setAlphaChannel(icon16a);
QIcon appicon(icon128);
appicon.addPixmap(icon64);
appicon.addPixmap(icon32);
appicon.addPixmap(icon16);
setWindowIcon(appicon);
--
[ signature omitted ]