[openlp-dev] Requests v QNetworkManager
Philip Ridout
phill.ridout at gmail.com
Thu Nov 22 10:34:06 EST 2018
I know this has been brought up before (cause I was the one who brought it
up) but can't help feeling that QNetworkManager has some unignorable
advantages.
A little background, I've been trying to make requests run in a thread so
that the first time wizard can update a progress bar.
With QNetworkManager I would simply call 'get()' and connect the
downloadProgress signal of the returned QNetworkReply object to the
progress bar. Implementing this in requests in a thread wasn't difficult,
in itself, but then I found my self having to deal with exceptions emitted
in the thread. This is easily done with the error signal of QNetworkReply.
Next I came up with the issue of aborting the download if the user canceled
the wizard. QNetworkReply has an abort slot, nice and easy.
I know Raoul wants to use requests because it does a lot of stuff for us,
and I appreciate that, but I'm just finding it a bit limiting.
Maybe I'm just too stupid to be using threads!
Thoughts?
Phill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openlp.io/pipermail/openlp-dev/attachments/20181122/a6bdf8d2/attachment.html>
More information about the openlp-dev
mailing list