PDA

View Full Version : plugin qjpegd4.dll is loaded successfully but I fail to display a .jpg in a widget



poohdl
28th March 2010, 05:33
QT 4.5.2
WINDOW 7
VS2005
add in 1.1.4

I use QPluginLoader to load the qjpegd4.dll
QPluginLoader::isLoaded() return ture
but I can not display a .jpg in a widget (other imageformats such as bmp and png work well)
QImage image("pic.jpg");
ui.widget->setImage(&image);

in show output from debug it says
qjpegd4.dll No symbols loaded.

what did I miss?

Regards,

Lykurg
28th March 2010, 07:41
Please show us your real code, because a widget does not have a setImage function. Also Qt will load the plugin, if it is in the right path, by itself. Maybe the problem is that you load the plugin.

poohdl
29th March 2010, 11:23
I delete the code for loading the plugin.
And I put the imageformats fold into my project's debug fold.
Then it works well.

Maybe I should set the QTDIR environment while I am using the QT add-in.