[Qt-interest] QPixmap return null pixmap on VC
Alessandro Portale
Alessandro.Portale at trolltech.com
Sat Apr 11 23:19:50 CEST 2009
Hi,
the supportedImageFormats() list proves that no image plugins are
loaded. And as you say, you moved the Qt directory after building Qt.
Most probably, you did not change all places where the original build
path is stored. For example QtCore[d].dll will also have those pathes
inside, which is hard to patch.
Plugin loading is not a trivial topic, and Qt will attempt to load the
plugins from several places:
1) Where they where configured/built (absolute directory)
2) Where QCoreApplication::libraryPaths() points to
3) In the imageformats\ subdir next to your application.exe [*]
(I am not sure about the order right now, but apparently in your case 1,
2 and 3 fail.)
The cleanest solution would be to reconfigure/rebuld Qt where it is
right now and not moving it, afterwards. Solving (2) and (3) for your
development environment would be a hack.
[*] For deployment to a client, you will put the plugin dlls into a
subdirectory "imageformats\" next to your application.exe.
Hope that helps, best regards,
Alessandro
OS Prog schrieb:
> Hi,
>
> The output of: "qDebug() << QImageReader::supportedImageFormats();" is:
>
> /("bmp", "pbm", "pgm", "png", "ppm", "xbm", "xpm") /
>
>
> Best regards,
> Nikolay
More information about the Qt-interest-old
mailing list