Updating a progress bar
-
i am trying to do a progress bar from 0% to 100%
that will get my value from my temp sensor (i called it bufferSplit) and i want that the number 0 will be the minimum and the number 35 will be the maximum(100%)This is for a project in my school
Thank you in advanced for the help =] -
Hi
Please have slightly more patience before bumping a topic
as many users here are in other time zones - so give it a day. :)QProgressbar has setMaximum() for setting upper limit.
If that is the actual question ?
-
Hi and welcome to devnet,
Then use QProgressBar::setRange
So basically:myProgressBar->setRange(0, 35);
-
Once you have them, call setValue on the progress bar
-
I mean that if you know that the temperature is between 0 and 35 then you can already set the minimum and maximum value of the progress bar.
What is buffersplit exactly ? A variable containing an integer value ?
-
Well, when
buffersplit
callsetValue(buffersplit)
on your progress bar.I'd recommend using a more descriptive variable name