[Qt-interest] Loading Qt Shared from DLL

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Tue Aug 25 23:01:03 CEST 2009


Finley Lee schrieb:
> I’m creating a Photoshop plug-in on the Windows platform which I’d like
> to use Qt with.  The plug-in is a DLL which is installed in a different
> folder from the application that loads it.  I would like to use the
> shared library version of Qt, but I can’t figure out how to get my
> plug-in to load the Qt DLLs when they are installed in the same folder
> as my plug-in.
> 
>  
> 
> I could put the Qt DLLs in Photoshop’s application folder, in the system
> directory, or the Windows directory, but this seems like an invitation
> for them to be overwritten by an installer for another product.
> 
>  
> 
> Is there a way to have the Qt DLLs get loaded from my plug-ins folder,
> or will I need to use the static version of Qt?
> 
>  
Looks like you're looking for
http://doc.trolltech.com/4.5/qcoreapplication.html#addLibraryPath

You should also carefully read
http://doc.trolltech.com/4.5/plugins-howto.html#the-higher-level-api-writing-qt-extensions
to make sure your plugins are in the correct subdirectory.


Christian



More information about the Qt-interest-old mailing list