[Qt-interest] Deploy an application on Windows

Wm. G. Urquhart wgu at wurquhart.co.uk
Fri Oct 16 09:33:13 CEST 2009


Gian Marco Gallo wrote:
> Good morning
> 
> Sorry for the delay but I was away from my work station =)
> 
> I've removed the *d4.dll files and now it seems to launch the software 
> (don't ask me why). But now I have the same troubles of the debug 
> version: on a pc without Qt installed I'm not able to see the window 
> icon (or the icon in the systray) and to work with MS SQL (it doesn't 
> see the database I think). I've included in the folder of the exe file 
> the "sqldrivers" folder and the "imageformats" folder but no luck.

<snip>

I too fell victim to this when I was installing my test application but 
here's what I found so I hope it helps.

Examine the .exe with dependencywalker to see what dlls it needs, and 
copy these in to the working folder of the installation target.

Take these files from the qt\sdk\qt\bin dir.

If you are using a database like me you also need to copy the 
appropriate database driver into the same folder from your 
plugins\sqldrivers directory.

As regards the icon, create a resource file and add the icons to the 
resource. Set the icon at start up using QIcon(...) in my case:

ui->dbState->setIcon(QIcon(":/form/icons/online")) ;

This way you can use an applicable icon to indicate the databases' state.

Remember to rebuild and copy your application having added the icons and 
all should be well.

-- 
William






More information about the Qt-interest-old mailing list