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)
for(i .... n )
{
...
...
..
}
for (i m)
{
for(j n)
{
......
......
}
}
for(i .... n )
{
...
...
..
}
for (i m)
{
for(j n)
{
......
......
}
}
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
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
Bookmarks