QWebEngineClientHints — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtWebEngineCore.QWebEngineClientHints

Inherits from QObject.

Description

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

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.

Methods

arch() → str


bitness() → str


fullVersion() → str

See also

setFullVersion().


fullVersionList() → dict[str, Any]

See also

setFullVersionList().


isAllClientHintsEnabled() → bool

TODO


isMobile() → bool


isWow64() → bool


model() → str


platform() → str


platformVersion() → str

See also

setPlatformVersion().


resetAll()

Resets all Client Hints settings to their default values.


setAllClientHintsEnabled(bool)


setArch(Optional[str])


setBitness(Optional[str])


setFullVersion(Optional[str])


setFullVersionList(dict[Optional[str], Any])

See also

fullVersionList().


setIsMobile(bool)


setIsWow64(bool)


setModel(Optional[str])


setPlatform(Optional[str])


setPlatformVersion(Optional[str])

See also

platformVersion().