Re: Qt4 does not load JPG's.
You have to import a static plugin into your application using Q_IMPORT_PLUGIN(qjpeg) macro. See docs for details.
Re: Qt4 does not load JPG's.
Quote:
Originally Posted by
wysota
You have to import a static plugin into your application using Q_IMPORT_PLUGIN(qjpeg) macro. See docs for details.
Isn't it possible to link static to the jpeg lib?
Why this difference between png and jpg? I mean, why does it load png files
without a plugin?
Re: Qt4 does not load JPG's.
Linking statically to the jpeg library (or rather the Qt plugin that links to libjpeg) is not enough. The application needs to be informed about the plugin - that's what the Q_IMPORT_PLUGIN macro is for.
PNG file support is embedded directly into Qt, without any plugins - that's why you can always load PNG or XPM images. This is not the case with JPEG or GIF. Reasons? As for GIF, surely the patent thing... As for JPEG? I don't know... ask Trolltech.