PySide6.QtWebEngineCore.QWebEngineGlobalSettings

class QWebEngineGlobalSettings

The QWebEngineGlobalSettings namespace holds global settings of the web engine.

Details

The QWebEngineGlobalSettings namespace holds global properties of the web engine.

Invoke setDnsMode() to configure DNS-over-HTTPS.

See also

setDnsMode()

Synopsis

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class SecureDnsMode

This enum sets the DNS-over-HTTPS mode used by the DnsMode structure:

Constant

Description

QWebEngineGlobalSettings.SecureDnsMode.SystemOnly

This is the default. Use the system DNS host resolution.

QWebEngineGlobalSettings.SecureDnsMode.SecureWithFallback

Enable DNS-over-HTTPS (DoH). DoH servers have to be provided through serverTemplates in the DnsMode structure. If a host cannot be resolved via the provided servers, the system DNS host resolution is used.

QWebEngineGlobalSettings.SecureDnsMode.SecureOnly

Enable DNS-over-HTTPS and only allow hosts to be resolved this way. DoH servers have to be provided through serverTemplates in the DnsMode structure. If the DNS-over-HTTPS resolution fails, there is no fallback and the DNS host resolution fails completely.

static setDnsMode(dnsMode)
Parameters:

dnsModeDnsMode

Return type:

bool

Sets dnsMode for DNS-over-HTTPS host resolution.

This function returns false if the serverTemplates list in the DnsMode structure is empty or contains URI templates that cannot be parsed for SecureOnly or SecureWithFallback . Otherwise, it returns true meaning that the DNS mode change is triggered.

class DnsMode

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

Details

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

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

PySide6.QtWebEngineCore.QWebEngineGlobalSettings.DnsMode.secureMode
PySide6.QtWebEngineCore.QWebEngineGlobalSettings.DnsMode.serverTemplates