3

I've used plugins before, but after I recompiled my qt libraries, I haven't been able to successfully use .svg image files any longer. There error I get is as follows:

file:///C:/Users/RBhatia/Documents/SettingsMenu/SettingsMenu/SlicingComp.qml:41:5: QML Image: Error decoding:
file:///C:/Users/RBhatia/Documents/SettingsMenu/SettingsMenu/img/sliceStep_slice1.svg: Unsupported image format

I have checked all my .dll files to make sure they are in 64 bit format. I also checked my environment variables, and even tried to use different librariesm but I simply cannot figure out what changed to cause this issue.

Charles
  • 50,943
  • 13
  • 104
  • 142

2 Answers2

4

The problem is not missing header files. It's due to missing dependencies to Qt libraries as mentioned in that comment here: Comment by JamesL

To use SVG images you need to specify QtSvg, QtXml, QtGui, and QtCore to be deployed with your project.

Robert Wloch
  • 243
  • 4
  • 9
1

The most probable reason I can think of is that you were missing some svg header files when you compiled your qt. If you do not add -svg to your configure, svg is treated as optional. Means if everything is there to build the svg plugin, it is build, else this feature is silently dropped.

You said, you checked your .dll files. Did you also check the plugins folder? Something like $QTDIR/plugins/imageformats. Must contains a qsvg4.dll. Or qsvg5.dll for Qt5.

Greenflow
  • 3,935
  • 2
  • 17
  • 28