wladek
28th March 2011, 15:49
Hi Guys,
I am trying to use the QML DocumentGalleryModel (http://doc.qt.nokia.com/qtmobility-1.1.1/qml-documentgallerymodel.html) with the following code (on my Symbian N8 device):
import Qt 4.7
import QtMobility.gallery 1.1
Rectangle {
width: 600
height: 360
color: "lightblue"
GridView {
id: gridView
anchors.fill: parent
cellWidth: 128
cellHeight: 128
model: DocumentGalleryModel {
rootType: DocumentGallery.Image
properties: [ "url" ]
}
delegate:
Item {
Image {
id: imageBusy
source: "busy.png"
width: 110
height: 110
sourceSize.width: 110
sourceSize.height: 110
visible: imageDelegate.status != Image.Ready
}
Image {
id: imageDelegate
asynchronous: true
source: url
smooth: true
width: 110
height: 110
fillMode: Image.PreserveAspectFit
sourceSize.width: 110
sourceSize.height: 110
onStatusChanged: {
console.log("Status is: " + status);
}
}
}
}
}
The problem is that displaying the images takes super long time (for just 20 images it takes around 10 seconds).
Any ideas on how can I improve this time?
I also know that drawing the image is problematic, hence retrieving the data from the model goes straight forward. It's also true that the images have a big resolution (aprox. 4000 x 2000).
Any leads are highly appreciated.
Thanks in advance and regards,
Wladek
I am trying to use the QML DocumentGalleryModel (http://doc.qt.nokia.com/qtmobility-1.1.1/qml-documentgallerymodel.html) with the following code (on my Symbian N8 device):
import Qt 4.7
import QtMobility.gallery 1.1
Rectangle {
width: 600
height: 360
color: "lightblue"
GridView {
id: gridView
anchors.fill: parent
cellWidth: 128
cellHeight: 128
model: DocumentGalleryModel {
rootType: DocumentGallery.Image
properties: [ "url" ]
}
delegate:
Item {
Image {
id: imageBusy
source: "busy.png"
width: 110
height: 110
sourceSize.width: 110
sourceSize.height: 110
visible: imageDelegate.status != Image.Ready
}
Image {
id: imageDelegate
asynchronous: true
source: url
smooth: true
width: 110
height: 110
fillMode: Image.PreserveAspectFit
sourceSize.width: 110
sourceSize.height: 110
onStatusChanged: {
console.log("Status is: " + status);
}
}
}
}
}
The problem is that displaying the images takes super long time (for just 20 images it takes around 10 seconds).
Any ideas on how can I improve this time?
I also know that drawing the image is problematic, hence retrieving the data from the model goes straight forward. It's also true that the images have a big resolution (aprox. 4000 x 2000).
Any leads are highly appreciated.
Thanks in advance and regards,
Wladek