[PyQt] QNetworkRequest::setAttribute(Attribute code, const QVariant &value)

Florian Bruhin me at the-compiler.org
Mon May 16 14:03:09 BST 2016


* redstone-cold <redstone-cold at 163.com> [2016-05-15 18:09:59 +0800]:
> I want to let my application to follow redirections, then it seems I should use 
> void QNetworkRequest::setAttribute(Attribute code, const QVariant &value)
> http://doc.qt.io/qt-5/qnetworkrequest.html#setAttribute
> 
> 
> I think the attribute to set should be QNetworkRequest::FollowRedirectsAttribute, but I don't know what value to set for the second parameter , any suggestions? 

Since FollowRedirectsAttribute is described as a bool, have you tried
True?

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160516/499888d9/attachment.sig>


More information about the PyQt mailing list