PySide6.QtWebEngineCore.QWebEngineProfileBuilder¶
- class QWebEngineProfileBuilder¶
- The - QWebEngineProfileBuilderclass provides a way to construct- QWebEngineProfile.- Details- A - QWebEngineProfileBuildercreates an instance of- QWebEngineProfileclass. Some profile’s properties have to be initialized in one call and should not be modified during profile lifetime. The web engine profile builder simply guards that.- Added in version 6.9. - Synopsis¶- Methods¶- 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 - __init__()¶
 - Creates an off-the-record profile with the parent object - parentthat leaves no record on the local machine and has no persistent data or cache. This will force cookies, persistent data and HTTP cache to be stored in memory- createProfile(storageName[, parent=None])¶
- Parameters:
- storageName – str 
- parent – - QObject
 
- Return type:
 
 - Constructs a profile with the storage name - storageNameand parent- parent.- The storage name is used to give each disk-based profile, a separate subdirectory for persistent data and cache. The storage location must be unique during application life time. It is up to the user to prevent the creation of profiles with same storage’s location, which can lead to corrupted browser cache. - A disk-based - QWebEngineProfileshould be destroyed before the application exit, otherwise the cache and persistent data may not be fully flushed to disk.- Note - When creating a disk-based profile, if the data path is already in use by another profile, the function will return a null pointer. - See also - setAdditionalTrustedCertificates(additionalTrustedCertificates)¶
- Parameters:
- additionalTrustedCertificates – .list of QSslCertificate 
- Return type:
 
 - Sets additional certificates for this profile’s CA certificate database to - certificates.- setCachePath(path)¶
- Parameters:
- path – str 
- Return type:
 
 - Sets the path used for the cache to - path.- By default, this is below StandardPaths::CacheLocation in a QtWebengine/StorageName specific subdirectory. - Note - Use QStandardPaths::writableLocation(QStandardPaths::CacheLocation) to obtain the QStandardPaths::CacheLocation path. - See also - setHttpCacheMaximumSize(maxSizeInBytes)¶
- Parameters:
- maxSizeInBytes – int 
- Return type:
 
 - Sets the maximum size of the HTTP cache to - maxSizeInBytesbytes.- Setting it to - 0means the size will be controlled automatically by QtWebEngine .- See also - setHttpCacheType(httpCacheType)¶
- Parameters:
- httpCacheType – - HttpCacheType
- Return type:
 
 - Sets the HTTP cache type to - httpCacheType.- See also - setPersistentCookiesPolicy(persistentCookiesPolicy)¶
- Parameters:
- persistentCookiesPolicy – - PersistentCookiesPolicy
- Return type:
 
 - Sets the policy for persistent cookies to - persistentCookiePolicy.- See also - setPersistentPermissionsPolicy(persistentPermissionPolicy)¶
- Parameters:
- persistentPermissionPolicy – - PersistentPermissionsPolicy
- Return type:
 
 - Sets the policy for persistent permissions to - persistentPermissionPolicy.- See also - setPersistentStoragePath(path)¶
- Parameters:
- path – str 
- Return type:
 
 - Sets the path used to store persistent data for the browser and web content to - path. Persistent data includes persistent cookies, HTML5 local storage, and visited links.- By default, this is below QStandardPaths::DataLocation in a QtWebengine/StorageName specific subdirectory. - Note - Use QStandardPaths::writableLocation(QStandardPaths::DataLocation) to obtain the QStandardPaths::DataLocation path.