PySide6.QtWebEngineCore.QWebEngineClientHints¶
- class QWebEngineClientHints¶
The
QWebEngineClientHints
class provides an object to customize User-Agent Client Hints used by a profile. More…Added in version 6.8.
Synopsis¶
Properties¶
Methods¶
def
arch()
def
bitness()
def
fullVersion()
def
isMobile()
def
isWow64()
def
model()
def
platform()
def
resetAll()
def
setArch()
def
setBitness()
def
setFullVersion()
def
setIsMobile()
def
setIsWow64()
def
setModel()
def
setPlatform()
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
andmobile
) are those that do not give away much information; the API makes these accessible with every request and they can not be disabled bysetAllClientHintsEnabled
.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.See also
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 andarchitecture
member of NavigatorUAData in JavaScript.- property bitnessᅟ: str¶
The value of the
Sec-CH-UA-Bitness
HTTP header andbitness
member of NavigatorUAData in JavaScript.- Access functions:
- property fullVersionᅟ: str¶
The value of the
Sec-CH-UA-Full-Version
HTTP header anduaFullVersion
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 andfullVersionList
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 andmobile
member of NavigatorUAData in JavaScript.Can not be disabled.
- Access functions:
- property modelᅟ: str¶
The value of the
Sec-CH-UA-Model
HTTP header andmodel
member of NavigatorUAData in JavaScript.- Access functions:
- property platformᅟ: str¶
The value of the
Sec-CH-UA-Platform
HTTP header andplatform
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 andplatformVersion
member of NavigatorUAData in JavaScript.- Access functions:
- property wow64ᅟ: bool¶
The value of the
Sec-CH-UA-Wow64
HTTP header andwow64
member of NavigatorUAData in JavaScript.- Access functions:
Getter of property
archᅟ
.- bitness()¶
- Return type:
str
See also
Getter of property
bitnessᅟ
.- fullVersion()¶
- Return type:
str
See also
Getter of property
fullVersionᅟ
.- fullVersionList()¶
- Return type:
Dictionary with keys of type .QString and values of type QVariant.
See also
Getter of property
fullVersionListᅟ
.- isAllClientHintsEnabled()¶
- Return type:
bool
Getter of property
isAllClientHintsEnabledᅟ
.- isMobile()¶
- Return type:
bool
See also
Getter of property
mobileᅟ
.- isWow64()¶
- Return type:
bool
See also
Getter of property
wow64ᅟ
.- model()¶
- Return type:
str
See also
Getter of property
modelᅟ
.- platform()¶
- Return type:
str
See also
Getter of property
platformᅟ
.- platformVersion()¶
- Return type:
str
See also
Getter of property
platformVersionᅟ
.- qt_qmlMarker_uncreatable()¶
- resetAll()¶
Resets all Client Hints settings to their default values.
- setAllClientHintsEnabled(enabled)¶
- Parameters:
enabled – bool
See also
Setter of property
isAllClientHintsEnabledᅟ
.Setter of property
archᅟ
.Setter of property
bitnessᅟ
.- setFullVersion(arg__1)¶
- Parameters:
arg__1 – str
See also
Setter of property
fullVersionᅟ
.- setFullVersionList(arg__1)¶
- Parameters:
arg__1 – Dictionary with keys of type .QString and values of type QVariant.
See also
Setter of property
fullVersionListᅟ
.- setIsMobile(arg__1)¶
- Parameters:
arg__1 – bool
See also
Setter of property
mobileᅟ
.Setter of property
wow64ᅟ
.Setter of property
modelᅟ
.- setPlatform(arg__1)¶
- Parameters:
arg__1 – str
See also
Setter of property
platformᅟ
.- setPlatformVersion(arg__1)¶
- Parameters:
arg__1 – str
See also
Setter of property
platformVersionᅟ
.