Hello all!

I have this weird situation, and I can't seem to find the solution myself. Maybe someone has had this problem before or can point me in the right direction.

I have made an application in Qt creator. It loads a JPG from an internet source, and puts it in a QPixmap, which is then displayed by a label. No problem here, it works.

Now, the problem arises, when I compile the same application for Windows Mobile. I have compiled the Qt libraries with Qt everywhere, according to the documentation, all seemed to work. I can also get the app on the phone im using to test and debug the app.

Now, the same code, gives me a problem when I try to load the data into the QPixmap. It is the same JPG and even the data the app gathered looks the same as with the desktop app.

Does anyone have a clue, why this fails on Windows Mobile 6.1?


Here is some code that is called when I have received all the JPG data.
m_imgData is q QByteArray, which does have the same size as in the desktop app, so I guess, this should be ok.
Qt Code:
  1. QPixmap img;
  2. img.loadFromData(m_imgData, "JPG"); // returns false on Windows Mobile, not on desktop!! why??
  3. ui.lblImage->setText(m_imgData);
  4.  
  5. m_imgData.clear();
  6. Reply->deleteLater();
To copy to clipboard, switch view to plain text mode 

Any ideas?


Grtz,

Stefan