QWebEngineGlobalSettings::DnsMode Struct
struct QWebEngineGlobalSettings::DnsModeDnsMode 结构提供了指定 DNS 主机解析模式的方法。更多
头文件: | #include <DnsMode> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
自 | Qt 6.6 |
公共变量
QWebEngineGlobalSettings::SecureDnsMode | secureMode |
QStringList | serverTemplates |
详细描述
QWebEngineGlobalSettings::DnsMode 结构描述了 DNS 模式以及用于 DNS 主机解析的相关 DNS 服务器模板。
成员变量文档
QWebEngineGlobalSettings::SecureDnsMode DnsMode::secureMode
该变量表示用于主机解析的 DNS 模式。
将secureMode 设置为SecureDnsMode::SecureOnly ,只允许使用serverTemplates 中的服务器进行 DNS-over-HTTPS 主机解析。
将secureMode 设置为SecureDnsMode::SecureWithFallback ,可使用serverTemplates 中的服务器启用 DNS-over-HTTPS 主机解析,并回退到系统 DNS。
另请参阅 QWebEngineGlobalSettings::SecureDnsMode 。
QStringList DnsMode::serverTemplates
该变量包含用于安全 DNS-over-HTTPS 主机解析的服务器 URI 模板列表。
serverTemplates
结构成员列出了URI 模板。URI 模板的示例是 https://dns.google/dns-query{?dns}。
© 2025 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.