Qt Network

Qt Network 为使用 TCP/IP 编程应用程序提供了一套 API。由各种 C++ 类处理如请求、Cookie 及透过 HTTP 发送数据的操作。

使用模块

使用 Qt 模块要求直接或透过其它依赖链接到模块库。一些构建工具为此有贡献支持,包括 CMake and qmake .

构建采用 CMake

使用 find_package() 命令去定位所需模块组件,在 Qt5 包:

find_package(Qt5 COMPONENTS Network REQUIRED)
target_link_libraries(mytarget Qt5::Network)
					

另请参阅 构建采用 CMake 概述。

采用 qmake 构建

Add network QT 变量:

QT += network
					

文章和指南

这些文章包含 Qt Network 设置和具有网络能力的应用程序的有关信息。

API 参考

这些是 API 参考材料链接。

许可和归属

Qt Network 在商业许可下是可用的来自 Qt 公司 。此外,它是可用的根据 GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。

Qt Network 可以使用 OpenSSL 工具包 作后端。那么,按相应方式链接到 OpenSSL 的库将要求服从 OpenSSL 许可 。要允许在 GPL 下链接 OpenSSL 和 Qt Network,下列 GPL 例外情况确实适用:

In addition, as a special exception, the copyright holders listed above give
permission to link the code of its release of Qt with the OpenSSL project's
"OpenSSL" library (or modified versions of the "OpenSSL" library that use the
same license as the original version), and distribute the linked executables.
You must comply with the GNU General Public License version 2 in all
respects for all of the code used other than the "OpenSSL" code.  If you
modify this file, you may extend this exception to your version of the file,
but you are not obligated to do so.  If you do not wish to do so, delete
this exception statement from your version of this file.
					

另请注意:随附 OpenSSL 可能导致 进出口限定 被应用。