0

My application is built with Qt 5.0.1 and QtQuick 2.0. It runs just fine in Qt Creator, but I'm having trouble getting it to deploy properly. I copied the executable (Release version) into a directory on my desktop called "Project Deployment" and added a bunch of DLL's (release versions, not debug), my QML files, and the SVG images.

Everything works fine except the SVG images, which don't show up at all. I converted one of them to a GIF, and it displayed perfectly. So clearly, I'm not setting up the QT SVG plugins properly.

I've got this in main(), right after QApplication app is defined:

QStringList libPaths = QCoreApplication::libraryPaths();
libPaths.append(QCoreApplication::applicationDirPath() + "/plugins");
app.setLibraryPaths(libPaths);

In the Project Deployment/plugins folder, I've placed iconengines/qsvgicon.dll and imageformats/qsvg.dll. In the Project Deployment folder, I have the Qt5Xml.dll (because I read somewhere that because SVG is in XML format, it uses that dll).

I am completely out of ideas (and internet resources). Can anyone help?

Thanks!

jmbeck
  • 938
  • 2
  • 11
  • 21

2 Answers2

1

If you run the SVG plugin (QSvg.dll) through Dependency Walker, you find that it relies on Qt5Svg.dll.

Simon Warta
  • 10,850
  • 5
  • 40
  • 78
jmbeck
  • 938
  • 2
  • 11
  • 21
0

It needs to be placed in the imageformats folder, e.g. C:\Program Files\AppFolder\imageformats\qsvg.dll

More info here: http://doc.qt.digia.com/stable/deployment-plugins.html

MartinJ
  • 1,656
  • 9
  • 8