Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QNetworkRequest or QNetworkReply timeout
halfgaar last edited by halfgaar
From what I can find and what I see in my tests, QNetworkRequest still doesn't have a timeout (QT 5.1 in my case). Is that true? But why does the NetworkError then have a TimeoutError?
Edit: actually, I do see now that a timeout can occur, it's just very long. I can't seem to find a way to set a timeout to another value. Is there a way?
BERGLE last edited by
Maybe you can start an extra timer for checking the state, stopping the request... ?
halfgaar last edited by
I use timers now, but it's error prone and a bit clunky. You can forgot to connect
QNetworkReply::deleteLater, or to connect
QTimer::stop, or any other boiler plate code. If you do, you get very weird effects, such as your normal slots being activated after timeout already having occurred.
There is an open bugreport about it, on which I commented.