PDA

View Full Version : School project using Qt



Latvian
6th May 2012, 18:14
So i have to make build and fix development of basic program. I chosed qt creator for this purpose - and i would need some feedback and little help.
I started making random program which task is to go through years (from 1993 - 1999). I connected it with progressbar (counting years - from 0 - 6). But there is one problem - each value is = 1 % in bar. but as it reaches 6 it should be 100% of progressbar but it is only with value 6% of it .
Here is example of the GUI:
7687

ChrisW67
7th May 2012, 01:56
QProgressBar::setMinimum() and QProgressBar::setMaximum() set the values that correspond to an empty or full progress bar. The maximum is currently set at 100, which is a common value given that progress is often given as percent done. You want to set it to 6 (or convert your step number to a percentage before updating the progress bar).