gpt4 book ai didi

c++ - 如何区分 QNetworkReply 是否中止?

转载 作者:太空宇宙 更新时间:2023-11-03 10:42:50 25 4
gpt4 key购买 nike

我有以下代码:

connect(&netMgr, SIGNAL(finished(QNetworkReply*)), this, SLOT(loadFinished(QNetworkReply*)), Qt::UniqueConnection);
reply = netMgr.get(qheader);

我怎么知道 loadFinished();槽由调用触发回复->是否中止?

最佳答案

如果中止,QNetworkReply::error() 应该返回 QNetworkReply::OperationCanceledError,这意味着:

the operation was canceled via calls to abort() or close() before it was finished.

关于c++ - 如何区分 QNetworkReply 是否中止?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30863887/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com