Hello,

I want to ask about whether i can or not to set the maximum value of progress bar to value bigger than the max int value.

for example,

I have this case and I want to use prgressbar for it.

I have 2 differetnt loops.

the first loop is O(n)

the 2nd loop is O(n*m)
(m !=n)
Qt Code:
  1. for(i .... n )
  2. {
  3. ...
  4. ...
  5. ..
  6.  
  7. }
  8.  
  9. for (i m)
  10. {
  11.  
  12. for(j n)
  13. {
  14. ......
  15. ......
  16. }
  17.  
  18. }
To copy to clipboard, switch view to plain text mode 


These loops takes long time to finish, so i want to set progress bar

I tried to set the maximum value to

n + (n*m)

and and the increse its value by 1 for each iteration, this way works fine when the n and m are not too big, but when n and m are really big such as ( 2 M) this way wont works
as the
Qt Code:
  1. QProgressBar.setMaximum(int)
To copy to clipboard, switch view to plain text mode 
take "int" and int type can not hold big values.

so plz, dose any one have an idea of how I can solve this issue.

thanks