Qt-interest Archive, June 2007
Re: qt Gif/Jpg Plugin
Message 1 in thread
On 5/31/07, bunjee <bunjeee@xxxxxxx> wrote:
> I've compiled the open source version of Qt 4.2 supposedly with the JPEG and
> the GIF plugin :
> configure.exe -qt-gif -qt-libjpeg
>
> Now I'm trying to use a jpeg or a gif file in my program.
> For some reason it's not loading it.
The plugin is a separate DLL which must be available for the app (i.e.
in same directory or somewhere in PATH)
See http://doc.trolltech.com/4.2/deployment-windows.html#qt-plugins
Basically, look in the directory "plugins" under the qt source
directory and some dlls for the jpeg and gif plugin should be there
... put them to directory with your app and it should work :)
Martin Petricek
> Is there something special to do ? or a specific dll to add for this feature
> to work ?
>
> Thanks.
>
> Ben.
--
[ signature omitted ]
Message 2 in thread
BH schrieb:
> On 5/31/07, bunjee <bunjeee@xxxxxxx> wrote:
>> I've compiled the open source version of Qt 4.2 supposedly with the
>> JPEG and
>> the GIF plugin :
>> configure.exe -qt-gif -qt-libjpeg
>>
>> Now I'm trying to use a jpeg or a gif file in my program.
>> For some reason it's not loading it.
>
> The plugin is a separate DLL which must be available for the app (i.e.
> in same directory or somewhere in PATH)
That's wrong: Qt plugins are neither being searched in the application
directory nor in the PATH. They are being searched in the "Qt plugin
directories", for example {app_dir}/imageformats etc. or set
programmatically.
(Note: the application directory is merely the /plugin base/ directory.
The plugins itself are located in the subdirectories 'imageformats',
'styles', etc.)
In no case are plugins searched in the PATH.
> See http://doc.trolltech.com/4.2/deployment-windows.html#qt-plugins
Also have a look at:
http://doc.trolltech.com/4.2/plugins-howto.html
"
The Higher-Level API: Writing Qt Extensions:
[...]
But where is the plugins directory? When the application is run, Qt will
first treat the application's executable directory as the pluginsbase.
[...] Qt will also look in the directory specified by
QLibraryInfo::location(QLibraryInfo::PluginsPath), which typically is
located in QTDIR/plugins (where QTDIR is the directory where Qt is
installed). If you want Qt to look in additional places you can add as
many paths as you need with calls to QCoreApplication::addLibraryPath().
And if you want to set your own path or paths you can use
QCoreApplication::setLibraryPaths(). You can also use a qt.conf file to
override the hard-coded paths that are compiled into the Qt library. For
more information, see the Using qt.conf documentation."
Cheers, Oliver
--
[ signature omitted ]
Message 3 in thread
for me, application load images formats like gif or jpeg because I
copied the imageformats folder from QTDIR/plugins folder
to the application executable folder.
not only imageformats contents but imageformats folder and his contents.
Till Oliver Knoll a écrit :
> BH schrieb:
>
>> On 5/31/07, bunjee <bunjeee@xxxxxxx> wrote:
>>
>>> I've compiled the open source version of Qt 4.2 supposedly with the
>>> JPEG and
>>> the GIF plugin :
>>> configure.exe -qt-gif -qt-libjpeg
>>>
>>> Now I'm trying to use a jpeg or a gif file in my program.
>>> For some reason it's not loading it.
>>
>>
>> The plugin is a separate DLL which must be available for the app (i.e.
>> in same directory or somewhere in PATH)
>
>
> That's wrong: Qt plugins are neither being searched in the application
> directory nor in the PATH. They are being searched in the "Qt plugin
> directories", for example {app_dir}/imageformats etc. or set
> programmatically.
>
> (Note: the application directory is merely the /plugin base/
> directory. The plugins itself are located in the subdirectories
> 'imageformats', 'styles', etc.)
>
> In no case are plugins searched in the PATH.
>
>> See http://doc.trolltech.com/4.2/deployment-windows.html#qt-plugins
>
>
> Also have a look at:
>
> http://doc.trolltech.com/4.2/plugins-howto.html
>
>
> "
> The Higher-Level API: Writing Qt Extensions:
>
> [...]
> But where is the plugins directory? When the application is run, Qt
> will first treat the application's executable directory as the
> pluginsbase. [...] Qt will also look in the directory specified by
> QLibraryInfo::location(QLibraryInfo::PluginsPath), which typically is
> located in QTDIR/plugins (where QTDIR is the directory where Qt is
> installed). If you want Qt to look in additional places you can add as
> many paths as you need with calls to
> QCoreApplication::addLibraryPath(). And if you want to set your own
> path or paths you can use QCoreApplication::setLibraryPaths(). You can
> also use a qt.conf file to override the hard-coded paths that are
> compiled into the Qt library. For more information, see the Using
> qt.conf documentation."
>
> Cheers, Oliver
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]