Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Korean
  4. qprogessbar question!!!
Forum Updated to NodeBB v4.3 + New Features

qprogessbar question!!!

Scheduled Pinned Locked Moved Unsolved Korean
4 Posts 4 Posters 811 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.
  • D Offline
    D Offline
    ds3216
    wrote on last edited by
    #1

    If you set Text setformat in qprogressbar and raise % to setvalue, the text begins to appear after 50%.

    d->ui->progressScan->setFormat("set format");
    d->ui->progressScan->setValue(progressTimer().linePercent()); //percent value

    It is working as timer and is being updated normally. That's the only problem.

    answer please.!!!

    jsulmJ JonBJ S 3 Replies Last reply
    0
    • D ds3216

      If you set Text setformat in qprogressbar and raise % to setvalue, the text begins to appear after 50%.

      d->ui->progressScan->setFormat("set format");
      d->ui->progressScan->setValue(progressTimer().linePercent()); //percent value

      It is working as timer and is being updated normally. That's the only problem.

      answer please.!!!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ds3216 I can't answer as I don't understand your description.
      Please explain better and show your real code.

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

      1 Reply Last reply
      0
      • D ds3216

        If you set Text setformat in qprogressbar and raise % to setvalue, the text begins to appear after 50%.

        d->ui->progressScan->setFormat("set format");
        d->ui->progressScan->setValue(progressTimer().linePercent()); //percent value

        It is working as timer and is being updated normally. That's the only problem.

        answer please.!!!

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @ds3216
        No reason why this should be so. Check your min & max values. Check what progressTimer().linePercent() is actually returning. Create a standalone minimal reproducer. State what version of Qt and what platform you are using.

        1 Reply Last reply
        0
        • D ds3216

          If you set Text setformat in qprogressbar and raise % to setvalue, the text begins to appear after 50%.

          d->ui->progressScan->setFormat("set format");
          d->ui->progressScan->setValue(progressTimer().linePercent()); //percent value

          It is working as timer and is being updated normally. That's the only problem.

          answer please.!!!

          S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by
          #4

          @ds3216 said in qprogessbar question!!!:

          is being updated normally

          What do you mean by that? The most common approach I know, is to do some work inside a loop and call setValue() on the QProgressBar. Usually, that loop is inside the main thread which also happens to be the GUI thread. This basically prevents the event loop from handling the update of the progress bar. The easiest way to test this is to put QApplication::processEvents() right after calling setValue() (or setFormat()). This is not the best solution and will heavily slow down your application. So, don't leave it inside your code. Once you confirm that this is the problem, we can help out with a better solution. In that case we would need more context how and when you are calling setValue().

          1 Reply Last reply
          1

          • Login

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