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
Forum Updated to NodeBB v4.3 + New Features

Synchronous QImage saving

Scheduled Pinned Locked Moved Unsolved General and Desktop
qimagesavesynchronous
4 Posts 3 Posters 2.1k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    sabativi
    wrote on 30 May 2016, 13:09 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

    R 1 Reply Last reply 30 May 2016, 13:17
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 30 May 2016, 13:16 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
      • S sabativi
        30 May 2016, 13:09

        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

        R Offline
        R Offline
        raven-worx
        Moderators
        wrote on 30 May 2016, 13:17 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

        S 1 Reply Last reply 1 Jun 2016, 07:28
        0
        • R raven-worx
          30 May 2016, 13:17

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

          S Offline
          S Offline
          sabativi
          wrote on 1 Jun 2016, 07:28 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

          2/4

          30 May 2016, 13:16

          • Login

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