You mean you append to byte array the exact string from link [3]?? Then it is not going to work in any way! For example the "-128" string is a 4 characters so if they are just 8-bit characters this whole string has 4 bytes, so the '-' would be you alpha, '1' (not 1, the character '1') would be your red color and so on... Rather convert it to a values.
BR, Filip On Fri, Jun 13, 2014 at 7:52 AM, Damian Ivanov <damianator...@gmail.com> wrote: > 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 > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest