Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Synchronous QImage saving
QtWS25 Last Chance

Synchronous QImage saving

Scheduled Pinned Locked Moved Unsolved General and Desktop
qimagesavesynchronous
4 Posts 3 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sabativiS Offline
    sabativiS Offline
    sabativi
    wrote on last edited by
    #1

    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

    raven-worxR 1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • sabativiS sabativi

        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

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

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

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        sabativiS 1 Reply Last reply
        0
        • raven-worxR raven-worx

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

          sabativiS Offline
          sabativiS Offline
          sabativi
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved