Problem displaying images from the phone gallery
-
When I try to retrieve images from the phone gallery, I get this:
[Qt Message] file:///C:/Private/e4b60ad7/qml/gallery/MainPage.qml:28:25: QML Image: Error decoding: file:///e:/images/camera/201010/201010a0/06102010015.jpg: Unable to read image data
I suspect this is because of the missing capability. However, neither of the mentioned capabilities helped:
@# Allow network access on Symbian
symbian:TARGET.CAPABILITY += NetworkServices ReadUserData UserEnvironment@Here is a code snippet on how I try to retrieve and display images:
@import QtQuick 1.0
import com.nokia.symbian 1.0
import QtMobility.gallery 1.1Page {
id: mainPageRectangle { id: rectangle1 color: "#ffffff" anchors.fill: parent ListView { id: list_view1 x: 96 y: 158 anchors.fill: parent delegate: Item { x: 5 height: 40 Row { id: row1 spacing: 10 Rectangle { width: 100 height: 100 Image { anchors.fill: parent source: url } } } } model: DocumentGalleryModel { rootType: DocumentGallery.Image properties: ["url"] /*filter: GalleryWildcardFilter { property: "fileName"; value: "*.*"; }*/ } } }
}@
This filter thing was also giving me errors about "unsupported value of filter property", so I had to disable it. It seems that now I get my files, but decoding those fails. What am I missing here?