[Interest] QIcon from ARGB32 data

Damian Ivanov damianatorrpm at gmail.com
Fri Jun 13 07:52:50 CEST 2014


Hi Filip,

Thanks a lot for your answer!
It well kinda works - an icon is shown but it's garbage, it should not
be. Is there any information on the internet (I googled) on argb32
more specifically how it should look like(as byteArray)?
I'm asking because I am trying to implement a Qt-only(no kde binding)
StatusNotifier application(1).
I get via dbus (2) as QString and I kinda chop and cut it so it
contains (3) which I think should be correct data of an argb32 icon or
not?

After that I put (3) into the QByteArray via
byteArray.append(theChoppedAndCutStringExactlyAsContainedInLink3)
End at last I do:
QImage image((uchar *)utf8.constData(), 21, 14, QImage::Format_ARGB32);
QPixmap pixmap = QPixmap::fromImage(image);
return QIcon(pixmap) ;

Thanks for your time and help!
Damian

1. http://www.notmart.org/misc/statusnotifieritem/icons.html
2. http://pastie.org/9285519
3. http://pastie.org/9285524



More information about the Interest mailing list