Qt同步QNetworkAccessManager获取 [英] Qt synchronous QNetworkAccessManager get
本文介绍了Qt同步QNetworkAccessManager获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
执行同步QNetworkAccessManager :: get的正确方法是什么?
What's the proper way to do a synchronous QNetworkAccessManager::get ?
qt Wiki 提供了一种方法,但指出不推荐使用在实际应用中使用它." 邮件列表为Wiki提供了类似的解决方案
The qt wiki offers an approach, but states "it is not recommended to use this in real applications." The mailinglist offers a similar solution to the wiki.
推荐答案
Yum可能会使用以下内容:
Yum may use something like this:
QEventLoop loop;
connect(_netReply, SIGNAL(finished()), &loop, SLOT(quit()));
loop.exec();
这篇关于Qt同步QNetworkAccessManager获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文