If you have such big loops then setting value for the progress bar inside the most inner loop is not a good idea. Each time you set a new value and want it to be reflected in your UI, you need to force Qt to process its events. If you do that inside the most-inner loop, events are going to be processed a lot. Each time they are processed, the application is not doing the tasked you wanted it to but instead spins the event loop. This makes your task execute much longer (for some tasks it might take longer than tasks themselves). Consider setting new value for the progress bar in the most outer loop. This will reduce processing time significantly. You can't force the default QProgressBar to accept anything else than an int, you'd have to roll out your own progress bar implementation (it's not that complicated, you could subclass QProgressBar and provide your own counters) but I strongly suggest to avoid it.
Bookmarks