PDA

View Full Version : QGalleryQueryRequest not working on the device?



mismael85
5th July 2011, 07:42
Hi,
I am trying to use QGalleryQueryRequest to get the photos on the phone but this class works on on the simulator but it did not work for the device and return no errors.

iRequest = new QGalleryQueryRequest(gallery);
connect(iRequest, SIGNAL(resultSetChanged(QGalleryResultSet*)), this, SLOT(resultSetChanged(QGalleryResultSet*)));
iRequest->setRootType(QDocumentGallery::Image);
iRequest->execute();
#if defined (__LOG_FEATURE__)
qDebug()<<"iRequest error ="<< iRequest->error();
#endif
the returned result is not valid.
where is the problem?

mvuori
5th July 2011, 10:33
It might help in identifying the problem if you told what the device is in question. I think support and problems for QtMobility features varies. How is the result not valid? Empty, corrupted, wrong type...?

Still, you don't show all code. Perhaps you iRequest is a local variable and drops out of stack frame before the asynchronous processing of the result set is complete though whatever stages it requires. (The simulator may have different timing so the same does not happen.)

That was just a guess.

mismael85
5th July 2011, 10:53
Thank you for your reply.
I am using Nokia C7 device and QtSDK 1.1
iRequest is a member variable.
the result is not valid means that when i check set.isValid() it always returns false

mismael85
6th July 2011, 07:40
can any body help?