[Qt-qml] Problem with QML/re-occurrence of Bug: QTBUG-9053/QTBUG-8984

Tim O'Callaghan tocallaghan at meyn.net
Mon Mar 7 18:24:30 CET 2011


We have a QML file that includes SVG images. It works on all of our 
desktop platforms, but fails when trying  on our embedded platform.

It only fails when using QML to render it, if i use the port of 
demos/embeddedsvgviewer to render the SVG image on the embedded 
platform, the SVG renders fine.

Yet, whenever i try and use my QML application to render an SVG i get this:
-----
file:///data/views/qml/Overviewfile.qml:404:9: QML Image: Error 
decoding: file:///data/views/qml/svg/gears.svg: Unsupported image format
-----

The error message is generated in:
declarative/util/qdeclarativepixmapcache.cpp
at line 310, which leads to the method readImage, and then on to the 
comment on bug 9053, which is reported as closed.
http://bugreports.qt.nokia.com/browse/QTBUG-9053

I think this is the same issue. My guess is it's to do with image 
resizing, possibly a problem creating/writing an intermediate pixmap 
form. Is there some way around or a fix for this?

This problem is reproducible with qmlviewer and a simple qml file +
---------- test.qml -------------------
/* from http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html */
import QtQuick 1.0

Rectangle {
     width: 200
     height: 200
     color: "blue"

     Image {
        source: "svg/world.svg"
        anchors.centerIn: parent
     }
}
---------- attached world.svg -------------------
----------- configure switches -----------------
./configure -prefix /qt -I /qttools/install_root/qt/include/ -L 
/qttools/install_root/qt/lib/ -R /qttools/install_root/qt/lib/ 
-opensource -confirm-license -embedded x86 -xplatform 
qws/linux-embeddedlibx86-g++ -little-endian -qt-gfx-linuxfb 
-plugin-gfx-vnc -plugin-gfx-qvfb -qt-mouse-tslib -qt-mouse-pc 
-qt-mouse-qvfb -qt-kbd-tty -qt-kbd-qvfb -depths all -qt-freetype 
-qt-zlib -qt-gif -qt-libjpeg -qt-libpng -qt-libmng -qt-libtiff -svg 
-no-phonon -no-phonon-backend -no-webkit -no-qt3support -no-openssl 
-no-glib -no-cups -no-largefile -no-accessibility -no-multimedia 
-no-audio-backend -plugin-decoration-default -plugin-decoration-styled 
-plugin-decoration-windows -declarative -script -nomake examples -nomake 
demos -scripttools -nis -no-dbus -plugin-sql-sqlite -no-xmlpatterns 
-no-javascript-jit
------------------------------------------------

-- 
Tim O'Callaghan
Research &  Development
MEYN - Food Processing Technology B.V.
Noordeinde 68 - 1511 AE Oostzaan - The Netherlands
Phone: +31 756 84 3355 | Fax: +31 756 84 4150| E-mail: 
tocallaghan at meyn.net  | Web: http://www.meyn.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: world.svg
Type: image/svg+xml
Size: 93476 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110307/6743bcaf/attachment-0001.bin 


More information about the Qt-qml mailing list