[Qt-interest] QImage fail to load jpg file after linking with qt in static lib way.

James Yan jyan972 at gmail.com
Fri Dec 19 12:52:24 CET 2008


hey all,

i'm using qt at win32/msvc2005 express, my source code using QImage:

QImage img;
if(!img.load("c:/test.jpg"))
{
   printf("fail to load jpg file.\n");
}
else
{
   printf("success to load jpg file.\n");
}

the source code works well UNTIL i link my app with qt in statilc lib way,
the result always be :    printf("fail to load jpg file.\n");
after debug in i found it fail at those qt code lines:

bool QImageReader::read(QImage *image)
...
    if (!d->handler && !d->initHandler())  // return false with this "if"
        return false;
...

any suggestion for me? thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081219/f5b73ca8/attachment.html 


More information about the Qt-interest-old mailing list