class QWebEngineClientHints

The QWebEngineClientHints class provides an object to customize User-Agent Client Hints used by a profile. More

Inheritance diagram of PySide6.QtWebEngineCore.QWebEngineClientHints

Added in version 6.8.

Synopsis

Properties

Methods

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

Detailed Description

QWebEngineClientHints allows configuration of exposing browser and platform information via User-Agent response and request headers, and a JavaScript API.

The information accessed via this API is split into two groups: low entropy and high entropy hints. Low entropy hints ( platform and mobile ) are those that do not give away much information; the API makes these accessible with every request and they can not be disabled by setAllClientHintsEnabled .

All the others are high entropy hints; they have the potential to give away more information, therefore they can be disabled by setAllClientHintsEnabled .

Each profile object has its own QWebEngineClientHints object, which configures the Client Hint settings for that browsing context. If a Client Hint is not configured for a web engine profile, its default value is deduced from the system.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property archᅟ: str

The value of the Sec-CH-UA-Arch HTTP header and architecture member of NavigatorUAData in JavaScript.

Access functions:
property bitnessᅟ: str

The value of the Sec-CH-UA-Bitness HTTP header and bitness member of NavigatorUAData in JavaScript.

Access functions:
property fullVersionᅟ: str

The value of the Sec-CH-UA-Full-Version HTTP header and uaFullVersion member of NavigatorUAData in JavaScript.

Access functions:
property fullVersionListᅟ: Dictionary with keys of type .QString and values of type QVariant.

The value of the Sec-CH-UA-Full-Version-List HTTP header and fullVersionList member of NavigatorUAData in JavaScript.

It holds brand name and version number pairs in a QVariantMap. The provided values will be automatically extended by the currently used version of Chromium and a semi-random brand.

Access functions:
property isAllClientHintsEnabledᅟ: bool

This property controls whether the Client Hints HTTP headers are sent by WebEngine or not.

Enabled by default.

Access functions:
property mobileᅟ: bool

The value of the Sec-CH-UA-Mobile HTTP header and mobile member of NavigatorUAData in JavaScript.

Can not be disabled.

Access functions:
property modelᅟ: str

The value of the Sec-CH-UA-Model HTTP header and model member of NavigatorUAData in JavaScript.

Access functions:
property platformᅟ: str

The value of the Sec-CH-UA-Platform HTTP header and platform member of NavigatorUAData in JavaScript.

Can not be disabled.

Access functions:
property platformVersionᅟ: str

The value of the Sec-CH-UA-Platform-Version HTTP header and platformVersion member of NavigatorUAData in JavaScript.

Access functions:
property wow64ᅟ: bool

The value of the Sec-CH-UA-Wow64 HTTP header and wow64 member of NavigatorUAData in JavaScript.

Access functions:
arch()
Return type:

str

See also

setArch()

Getter of property archᅟ .

bitness()
Return type:

str

See also

setBitness()

Getter of property bitnessᅟ .

fullVersion()
Return type:

str

See also

setFullVersion()

Getter of property fullVersionᅟ .

fullVersionList()
Return type:

Dictionary with keys of type .QString and values of type QVariant.

Getter of property fullVersionListᅟ .

isAllClientHintsEnabled()
Return type:

bool

Getter of property isAllClientHintsEnabledᅟ .

isMobile()
Return type:

bool

See also

setIsMobile()

Getter of property mobileᅟ .

isWow64()
Return type:

bool

See also

setIsWow64()

Getter of property wow64ᅟ .

model()
Return type:

str

See also

setModel()

Getter of property modelᅟ .

platform()
Return type:

str

See also

setPlatform()

Getter of property platformᅟ .

platformVersion()
Return type:

str

Getter of property platformVersionᅟ .

qt_qmlMarker_uncreatable()
resetAll()

Resets all Client Hints settings to their default values.

setAllClientHintsEnabled(enabled)
Parameters:

enabled – bool

Setter of property isAllClientHintsEnabledᅟ .

setArch(arg__1)
Parameters:

arg__1 – str

See also

arch()

Setter of property archᅟ .

setBitness(arg__1)
Parameters:

arg__1 – str

See also

bitness()

Setter of property bitnessᅟ .

setFullVersion(arg__1)
Parameters:

arg__1 – str

See also

fullVersion()

Setter of property fullVersionᅟ .

setFullVersionList(arg__1)
Parameters:

arg__1 – Dictionary with keys of type .QString and values of type QVariant.

Setter of property fullVersionListᅟ .

setIsMobile(arg__1)
Parameters:

arg__1 – bool

See also

isMobile()

Setter of property mobileᅟ .

setIsWow64(arg__1)
Parameters:

arg__1 – bool

See also

isWow64()

Setter of property wow64ᅟ .

setModel(arg__1)
Parameters:

arg__1 – str

See also

model()

Setter of property modelᅟ .

setPlatform(arg__1)
Parameters:

arg__1 – str

See also

platform()

Setter of property platformᅟ .

setPlatformVersion(arg__1)
Parameters:

arg__1 – str

Setter of property platformVersionᅟ .