You are practically spinning a local event loop effectively stopping the flow and probably preventing your other window from executing its code. You should really use an event controlled approach.
You should connect to its signals, queue requests and return from the function. When QFtp is done doing its job, it will call your slot so can do everything you want to do.
Bookmarks