QFtp, like most Qt IO classes, is event based, so its needs a running event loop to do its job.
Your while loop blocks the main thread, so it can't run its event loop.
If you really need the "one file at a time" approach, then instead of having a loop that waits for things that never happen, you need a nested event loop that exists when the file has been transferred, or at least you need to call processEvents() inside the loop.
So the quickest change would be calling processEvents() inside the loop, the cleanest would be not to attempt blocking IO.
Cheers,
_
P.S.: you are leaking that QFile pointer, better create the object on the stack.
PP.S.: are you sure you want to upload the base64 encoded content?
Bookmarks