View Single Post
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#50
Originally Posted by Nathraiben View Post
Not sure whether they work the same in PyQt and Qt, but I had to set the value to something > 0 in order for the bar to show, since 0% more or less indicates that you didn't yet start.

With my rather short waiting times I simply set it to 50%, as I didn't really need a true progress bar but just an indication that the user will have to wait for for a short while.

With a script running for that long, a working progress bar would be rather helpful, though. Normally, you would just increment the value each time a part of your script is finished, but with just one large script I guess that would be hard.

Is there a way to split the script into smaller portions, so after each successful execute you can increment the value? Then, just set the value to 1% right before the first execute and the bar SHOULD show.
Did't work :/ No bar, no cancell-button.

But while I coulnd't figure out the bar -issue I optimized the script instead (which I should have done already...) and now it's taking only like 30 secs to complete and user is informed what's happening by notifications sent via DBUS.
__________________
If you're rich and you think I deserve a cold beer, you may donate one or two :-P

80's style stadium rock is back - FIRENOTE
Hi-Octane heavy metal - FORCE MAJEURE