Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.6.1, 5.6.2
-
None
-
Windows 10 Home, 64-bit, Intel i5 CPU, integrated graphics HD 4000
Qt 5.6.1 MinGW 4.9.2 32-bit
Qt 5.6.1 MSVC2013 64-bit
Qt 5.6.2 MSVC2015 64-bit
Description
I attached a project.
If I create a class with a QList<QImage> property and feed it with QImage objects in its definition then the application has a problem with decoding SVG images in QML, but only after deploy. It works well in Qt Creator. Of course it seems that I am missing some libraries but this does not seem to be a case here. I have experience with Windows deploys and I am positive it was done correctly. Beside that copying every possible plugin/dll to the deploy directory does not change anything
Removing definition, or just simplifying it to QList<QImage>() fixes the problem.
The error message I receive is:
qrc:///main.qml:13:5: QML Image: B??d dekodowania: qrc:/img2.svg: Nieobs?ugiwany format obrazu qrc:///main.qml:10:5: QML Image: B??d dekodowania: qrc:/img1.svg: Nieobs?ugiwany format obrazu // which translates to qrc:///main.qml:13:5: QML Image: error decoding: qrc:/img2.svg: unsupported image format qrc:///main.qml:10:5: QML Image: error decoding: qrc:/img1.svg: unsupported image format
Steps I made to deploy application:
- run qmake, rebuild application
- run wideployqt, using following command: "C:\Qt\5.6\msvc2013_64\bin\windeployqt" --qmldir "C:/QtProjekty/testSvgNotSupported" "TestSvgNotSupported.exe" -qml -quick
- copy msvc redist dlls
Code that does break SVG loading in QML:
// testclass.h #ifndef TESTCLASS_H #define TESTCLASS_H #include <QList> #include <QImage> class TestClass { public: static const QList<QImage> images; }; #endif // TESTCLASS_H
// testclass.cpp #include "testclass.h" const QList<QImage> TestClass::images = QList<QImage>() << QImage(":/img1.png") << QImage(":/img2.png"); // const QList<QImage> TestClass::images = QList<QImage>(); // works well