安全套接字客户端

演示如何通过加密(SSL)连接进行通信。

本示例使用QSslSocket 演示如何通过加密连接进行通信、处理身份验证问题,以及显示安全与证书信息。

用户输入要连接的主机名和端口号后,即可查看安全证书

示例项目 @ code.qt.io

© 2026 The Qt Company Ltd. 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.