Synchronous QImage saving



  • Hello,

    I am actually trying to test a function which goal is to write some images on the disk, the only problem i am facing is that save seems to be asynchronous and i was wondering if there was any way to emit a signal when saving has finished.

    Thanks in advance,

    Victor


  • Moderators

    How do you save? Do you call QImage::save(...)?
    Its documentation says:
    "Returns true if the image was successfully saved; otherwise returns false."
    So, I would expect it to be synchronous. Why do you think it is not?


  • Moderators

    @sabativi
    the question is how you save the image.
    I am not aware that any saving method is asynchronous.



  • Hello @raven-worx,

    Yes you are damn right. Saving is synchronous.
    The problem i was facing is that i checked just after save if the image was written.
    Apparently it takes some times for the image to be written on disk.

    I use QTRY_VERIFY_WITH_TIMEOUTand it solved my problem.

    Thanks again


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.