PDA

View Full Version : DLL, image plugins



RickF
29th April 2010, 19:40
I'm writing a Windows DLL that uses QT. So, I'm not writing an application, instead a .dll.

I want to read a TIFF image, but, it seems that when my dll is deployed, I need to have the qtiff4.dll (a plugin) located
somewhere.

I tried calling QCoreApplication::setLibraryPaths() but that doesn't work (I'm not surprised, since my dll is of course not an app).

So, I can successfully load the plugin with QPluginLoader, and successfully cast that to a QImageIOPlugin*.
So, I have a path the the tiff file, how do I assemble all these parts to read my tiff file into a QImage?

THanks

Rick

aamer4yu
30th April 2010, 14:03
You need to have the 'imageformats' folder in the same directory as your application.
Copy it there , run ur app, and see if it works :)