How to use QGalleryQueryModel with QML?
-
I think that there is a bug in the QGalleryQueryModel
-
Is there anybody here?
-
bq.
[Qt Message] QVGImagePool: cannot reclaim sufficient space for a 2592×1944 imageI would try with a much smaller image first if i were you. I think your image is rather big for a mobile application.
-
but those image are displayed using the mobile gallery, also I tried small images and it was working.
I have another question does the gallery searches all photos in the mobile or it searches on specific places? -
Hi,
I have same code as above. But same results. I m not retreiving any images.
NOTE: im using QtMobility 1.1
I can't use http://doc.qt.nokia.com/qtmobility-1.2/qml-documentgallerymodel.html since filters does not work properly:
http://bugreports.qt.nokia.com/browse/QTMOBILITY-1741
So im wondering what is wrong with above code and why images are not retreived?
-
Hi Jano,
Finally I am able to use QGalleryQueryModel it took me several weeks to make it work.
and here are the solution
@ThumbnailModel::ThumbnailModel(QAbstractGallery *gallery, QObject *parent)
: QGalleryQueryModel(gallery, parent)
{
setRootType(QDocumentGallery::Image);QHash<int, QByteArray> properties; properties.insert(Qt::UserRole + 1, "url"); setRoleNames(properties); QHash<int, QString> columns; properties.insert(Qt::UserRole + 1, "url"); addColumn(columns); execute();
}@
I hope I helped you
-
Hi Mismael
It is neccessary to pass QAbstractGallery into constructor?
Can you share all code or even project?
Many Thanks for your help!
-
Please,
If is possible just post whole .h and .cpp files and main.cpp ( or where do you use tuhmbnailmodel ).
It will be really helpfull.
Many thanks
-
In QML can you try this
@ delegate: Image {
source: url
width: 128
height: 128
//add these two lines
sourceSize.width: 1024
sourceSize.height:1024
onSourceChanged: {
console.log("source changed");
}@
This will fix " [Qt Message] QVGImagePool: cannot reclaim sufficient space for a 2592×1944 image" issue -
Any update on this?
The standard QML Gallery Model still lets the app hang for minutes...