PDA

View Full Version : Add Delay.



Johncdy
16th March 2011, 04:11
Hi, I need delay functions that specifically for this type of codes.
for example:

picture.save(".........../mypicture.png");
------
delay code
------
QImage* editpicture = new QImage(".........../mypicture.png");
....some codes to edit picture.....
editpicture.save(".........../mypicture.png");

while using the emulator, this code doesnt have any problem, but while in the phone, it needs time to save the picture first before getting the same picture. But what happens is that:
after the saving line, the phone is loading to save it but the next line which is retrieving the picture is already working.

Any way to do delays that would not interfere with the saving and retrieving??

Thx in advance....

ghal maraz
16th March 2011, 09:18
You could try QTimer::singleShot to call a slot delayed.
But why do you want to save an image and load the same again?
Can't you use picture or create a copy of the instance?