Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved progress bar showing both "written" and "read" ?

    General and Desktop
    2
    4
    79
    Loading More Posts
    • 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.
    • D
      davecotter last edited by davecotter

      a progress bar may be thought of as showing how much data is written, say to a disk. but what if that same progress bar could also show how much data is being read from what was written? in this case if the reader catches up to the writer, the "Bar" would appear one pixel wide, but let's assume the reader is slower than the writer.

      so you'd see the bar "fill up" quickly, with color, left to right, but then be slowly eaten away with white, left to right. does that make sense?

      is this possible to accomplish using QProgressBar or by overriding it? without re-implementing the entire paint functionality.

      note i'm using styled drawing not platform drawing, so there is more flexibility.

      here's what i have:
      now.png

      here's what i want:
      want.png

      the left edge is being eaten even as the right edge is extending. see?

      1 Reply Last reply Reply Quote 0
      • D
        davecotter last edited by

        i was able to do it by overriding paint, calling inherited, then just erasing the start area

        1 Reply Last reply Reply Quote 1
        • artwaw
          artwaw last edited by

          Why not two progress bars, horizontal one on top of the other?
          If you feel like it you could make a single widget displaying two progress bars (and accepting two values to mark progress).
          Above all - why QScrollBar and not QProgressBar?

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply Reply Quote 0
          • D
            davecotter last edited by

            sorry, i originally wrote QScrollBar but meant to write QProgressBar. The spec calls for one bar, not two, so i'm following the spec, and can't change it. also, vertical space is at a premium. so: can i do this? i'm attempting to override the paint event to erase part of it.

            1 Reply Last reply Reply Quote 0
            • D
              davecotter last edited by

              i was able to do it by overriding paint, calling inherited, then just erasing the start area

              1 Reply Last reply Reply Quote 1
              • First post
                Last post