[Qt-interest] QPixmap return null pixmap on VC

Alessandro Portale alessandro.portale at trolltech.com
Thu Apr 9 20:09:54 CEST 2009


Ok,

then something seems to go wrong with your plugin loading. (Png is handled directly in QtGui, thus needs no plugin)
Two more questions:
- Did you move the Qt directory to another directory after building Qt?
- Does the output of "qDebug() << QImageReader::supportedImageFormats();" contain "jpeg" or "jpg"?

Regards,
Alessandro

OS Prog wrote:
> Hi,
> 
> Thanks for the reply!
> 
> Yes the dll(s) are built:
> 07/04/2009  16:55           120,832 qjpeg4.dll
> 07/04/2009  16:55               845 qjpeg4.exp
> 07/04/2009  16:55             2,032 qjpeg4.lib
> 07/04/2009  16:55           235,008 qjpegd4.dll
> 07/04/2009  16:55               848 qjpegd4.exp
> 07/04/2009  16:55           660,024 qjpegd4.ilk
> 07/04/2009  16:55             2,044 qjpegd4.lib
> 07/04/2009  16:55         1,092,608 qjpegd4.pdb
> 
> Yes, with .png it works.
> 
> Regards,
> Nikolay
> 
> 
>     ----------------------------------------------------------------------
> 
>     Message: 1
>     Date: Thu, 09 Apr 2009 12:54:16 +0200
>     From: Alessandro Portale <alessandro.portale at trolltech.com
>     <mailto:alessandro.portale at trolltech.com>>
>     Subject: Re: [Qt-interest] QPixmap return null pixmap on VC
>     To: qt-interest at trolltech.com <mailto:qt-interest at trolltech.com>
>     Message-ID: <49DDD3D8.7040405 at trolltech.com
>     <mailto:49DDD3D8.7040405 at trolltech.com>>
>     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
>     Hi,
> 
>     I have two questions in order to narrow down what goes wrong:
>     - Was the <qtfolder>/plugins/imageformats/qjpeg[d]4.dll built?
>     - Would it work with a .png image?
> 
>     Regards,
>     Alessandro Portale
> 
>     OS Prog wrote:
>      > Hi,
>      >
>      > The code:
>      > QPixmap *pixmap1 = new QPixmap("images/scroll.jpg");
>      >
>      > returns a null pixmap when I build it with VC. The same code
>     works when
>      > it is built with mingw.
>      > I tried to specify the whole path, like "QPixmap *pixmap1 = new
>      > QPixmap("C:/Work/SVN/Qt/VCProj/debug/images/scroll.jpg");", but it is
>      > the same.
>      >
>      > Where could be the problem?
>      >
>      > I just compiled the Qt SDK for Windows with "VC2008 Express"'s
>     compiler
>      > in separate folder. The original folder is with mingw.
>      >
>      > Regards,
>      > Nikolay



More information about the Qt-interest-old mailing list