You are not allowing the main thread to do any event processing because you stay in a tight loop and do not return to the event loop.
Thus it cannot do any process any updates, neither for your main UI nor for the progress dialog.

If loading of a single file is fast enough you can call QCoreApplication:rocessEvents() in between files, ideally later on refactoring it to process files from a queue with a slot that is called through delayed invocation for every run.

If loading of a single file can take longer than a user would be comfortable with, then you'll either need to do event process in the loading code or move loading to a thread.

Cheers,
_