SourceForge has been redesigned. Learn more.
Close

#162 SVGs do not work on a device, but do on the emulator

unstable
open
nobody
None
2014-09-26
2012-02-25
Adam Pigg
No

The following snippet works ok on the android emulator, but not on my test device, and ARMv5 ZTE Blade running CM7 (android 2.3.7)

Image {
    id: spaceimage

    source: "pics/space.svg"
    width: parent.width
    height: parent.height
    smooth:  true
}

the following error is displayed:
W/Qt (17737): qrc:/qml/pgz-spaceinvaders/SpaceLogo.qml:9:5: QML Image: Error decoding: qrc:/qml/pgz-spaceinvaders/pics/space.svg: Unsupported image format

QtSVG lib has been included in the project.

Discussion

  • Kirill Kulakov

    Kirill Kulakov - 2012-05-24

    I have the same problem. I fix it in my project by marked QtXml as required library for package. It seems, that QtSvg lib doesn't provide this dependency automatically.

     
  • Federico Brega

    Federico Brega - 2013-04-17

    Explicitly including QtXml worked for me, too.
    Tested on Android 4.0 armv7

     

Log in to post a comment.