View Single Post
Old 08-14-2018, 12:47 PM   #1
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 584
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
How to use progress dialog?

I'm trying to create a UI plugin which processes selected books. All is well, but I end up with a loop of the form:
Code:
for book in book_list:
    ... do stuff ...
which does the work successfully enough, but tells me nothing until it finishes.

What I'd like is to have a blocking progress dialog that goes from 0 to len(book_list), updating each time around the loop. The only code sample I can find uses ProgressDialog and seems to involve lots of complication with WorkerThreads and suchlike. Maybe this is the easiest way to do it, maybe not... but can anyone give me some pointers on how to write minimal code to do what I want?

Last edited by Phssthpok; 08-14-2018 at 01:14 PM.
Phssthpok is offline   Reply With Quote