PDA

View Full Version : Qt plugins / dll help



deca5423
13th June 2009, 13:10
I've got an app I'd like to deploy and test on target machines. But I'm having issues with dlls, specifically the Qt plugins. My app currently displays images in bmp and png format using qpixmap. When I first tested on another machine it would never load bmp files, but pngs worked. Obviously these both work in my development environment, in release. Both machines are Vista Ultimate x64.

When I build my app in release I notice it takes forever to actually start it up on my development machine. (I'm running a quad core processor), but on target machine it loads quite quickly (older dual core processor). I believe this is because its trying to resolve dlls on my machine and its having trouble finding them, but these aren't on the target machine.

I've run depends.exe and all it really tells me is that I need qtgui4.dll and qtcore4.dll. What a big help that was. I know if I'm using jpegs I need qjpeg4.dll but what do I need for bmps and pngs? Theres no qbmp4.dll and qpng.dll (because that would be easy :p)

I've searched for hours on google and mostly all that comes up is 'how to make qt plugins'. I find these rather unintuitive and frustrating. Any help would be appreciated.

Lesiok
14th June 2009, 13:25
Look at <QT_DIR>\plugins\imageformats and read this (http://doc.trolltech.com/4.5.1/plugins-howto.html)

deca5423
17th June 2009, 19:02
I've looked in the imageformats folder. I don't see how creating a plugin would help me? I'm using qpixmap to load png's and bmp's. What baffles me is that it will load png's and not basic bmp's?

the code used for bmps is like this:

QPixmap bmp;
if ( !bmp.loadFromData( buffer, bufferSize, "bmp" ) )
throw error

And png:

QPixmap png;
if ( !png.loadFromData( buffer, bufferSize, "png" ) )
throw error

I don't understand what its using to load png's if its anything special. And why when deployed it will load png's but this line fails on bmps. Again, both work on my development machine.