- Qt 6.10
- Qt WebEngine
- C++ Classes
- QtWebEngineCore
- DnsMode
- Qt 6.10.2 Reference Documentation

# QWebEngineGlobalSettings::DnsMode Struct

struct QWebEngineGlobalSettings::DnsMode

The DnsMode struct provides means to specify the DNS host resolution mode. More...

Header: | `#include <DnsMode>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)` `target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)`
qmake: | `QT += webenginecore`
Since: | Qt 6.6

- List of all members, including inherited members

## Public Variables

QWebEngineGlobalSettings::SecureDnsMode | secureMode
QStringList | serverTemplates

## Detailed Description

The QWebEngineGlobalSettings::DnsMode structure describes the DNS mode and the associated DNS server template used for the DNS host resolution.

## Member Variable Documentation

### QWebEngineGlobalSettings::SecureDnsMode DnsMode::secureMode

This variable holds the DNS mode used for the host resolution.

Set secureMode to SecureDnsMode::SecureOnly to only allow DNS-over-HTTPS host resolution using servers from serverTemplates.

Set secureMode to SecureDnsMode::SecureWithFallback to enable DNS-over-HTTPS host resolution using servers from serverTemplates, with a fallback to the system DNS.

See also QWebEngineGlobalSettings::SecureDnsMode.

### QStringList DnsMode::serverTemplates

This variable holds a list of server URI templates used for secure DNS-over-HTTPS host resolution.

The `serverTemplates` structure member lists URI templates. An example of a URI template is https://dns.google/dns-query{?dns}.