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. ProgressBar not working
Qt 6.11 is out! See what's new in the release blog

ProgressBar not working

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.6k 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
    Daepilin
    wrote on last edited by
    #1

    Hio :)

    i wrote my little program where i want to display a calculated BMI using a progress bar.

    The progress bar shows its outline, but no value.

    my code:

    @ bmi_value = new QProgressBar(this);
    bmi_value->setValue(250);
    bmi_value->setGeometry(25, 120, 350, 40);
    bmi_value->setMinimum(0);
    bmi_value->setMaximum(1000);@

    and:

    @void BMI::calc(){
    double bmi_tmp(0);

    bmi_tmp = weigth_value / (heigth_value * heigth_value);
    bmi_value->setValue(bmi_tmp*10);
    bmi_value->setFormat("%p");

    update();

    }@

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Do you actually call calc somewhere?

      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