Split your code. One part of it should contain operations to be performed before the download is finished. The other (it should be a slot) should contain operations to be started after the download will have finished. Then at the end of the first part you can use QUrlOperator and connect the second part to its finished() signal. When the download is finished, the slot will be called and your code will continue its job.