本页内容

Utils::NetworkAccessManager Class

class Utils::NetworkAccessManager

NetworkAccessManager 类提供了一个网络访问管理器,用于配合Qt Creator 使用。更多内容...

Header: #include <NetworkAccessManager>

公共函数

NetworkAccessManager(QObject *parent = nullptr)

静态公共成员

Utils::NetworkAccessManager *instance()

重新实现的受保护函数

virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) override

详细说明

通用初始化,Qt Creator 用户代理。

最好将NetworkAccessManager::instance()返回的实例用于主线程。构造函数仅用于多线程环境。

成员函数文档

NetworkAccessManager::NetworkAccessManager(QObject *parent = nullptr)

使用父类parent 构建一个网络访问管理器实例。

[override virtual protected] QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)

为网络访问管理器创建request ,以便其对outgoingData 执行op 操作。

[static] Utils::NetworkAccessManager *NetworkAccessManager::instance()

返回一个应用于主线程的网络访问管理器实例。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.