sfcheng77
19th January 2011, 21:30
I am implementing my own download manager to download the file passed over from QWebView. I'd like to present the user a confirmation dialog before proceeding with the file download.
The handleUnsupported signal takes the following parameter:
unsupportedContent(QNetworkReply*reply)
If I directly use the reply to download the file without confirmation, everything works fine. If I popup a dialog or message box to confirm it, the reply object is no longer usable. Before the dialog is shown, reply->isFinished() return false. After the dialog is shown, I found reply->isFinished() return true. I can no longer use the reply object to continue downloading the file.
My best guess is that while the dialog is shown, the application's event loop starts running and somehow recycles the reply object.
Any tip on how to solve this problem would be greatly appreciated.
The handleUnsupported signal takes the following parameter:
unsupportedContent(QNetworkReply*reply)
If I directly use the reply to download the file without confirmation, everything works fine. If I popup a dialog or message box to confirm it, the reply object is no longer usable. Before the dialog is shown, reply->isFinished() return false. After the dialog is shown, I found reply->isFinished() return true. I can no longer use the reply object to continue downloading the file.
My best guess is that while the dialog is shown, the application's event loop starts running and somehow recycles the reply object.
Any tip on how to solve this problem would be greatly appreciated.