Skip to content

WebEngineProfile

Qt Base Class: QWebEngineProfile

Signature: QWebEngineProfile(self, name: str, parent: Optional[PySide6.QtCore.QObject] = None) -> None QWebEngineProfile(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object
QWebEngineProfile
PySide6.QtWebEngineCore
QWebEngineProfile(self, name: str, parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473574747376["webenginecore.WebEngineProfile"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473574676128["QtWebEngineCore.QWebEngineProfile"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473574747376
  140713234304496 --> 1473299815024
  1473574676128 --> 1473574747376
  1473288842240 --> 1473574676128
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QWebEngineProfile

Source code in prettyqt\webenginecore\webengineprofile.py
class WebEngineProfile(core.ObjectMixin, webenginecore.QWebEngineProfile):
    def set_persistent_cookie_policy(
        self, policy: PersistentCookiePolicyStr | mod.PersistentCookiesPolicy
    ):
        """Set the persistent cookie policy.

        Args:
            policy: persistent cookie policy
        """
        self.setPersistentCookiesPolicy(PERSISTENT_COOKIE_POLICY.get_enum_value(policy))

    def get_persistent_cookie_policy(self) -> PersistentCookiePolicyStr:
        """Return current persistent cookie policy.

        Returns:
            Persistent cookie policy
        """
        return PERSISTENT_COOKIE_POLICY.inverse[self.persistentCookiesPolicy()]

    def set_http_cache_type(self, typ: HttpCacheTypeStr | mod.PersistentCookiesPolicy):
        """Set the http cache type.

        Args:
            typ: http cache type
        """
        self.setHttpCacheType(HTTP_CACHE_TYPE.get_enum_value(typ))

    def get_http_cache_type(self) -> HttpCacheTypeStr:
        """Return current http cache type.

        Returns:
            Http cache type
        """
        return HTTP_CACHE_TYPE.inverse[self.httpCacheType()]

    def get_scripts(self) -> webenginecore.WebEngineScriptCollection:
        return webenginecore.WebEngineScriptCollection(self.scripts())

get_http_cache_type() -> HttpCacheTypeStr

Return current http cache type.

Source code in prettyqt\webenginecore\webengineprofile.py
def get_http_cache_type(self) -> HttpCacheTypeStr:
    """Return current http cache type.

    Returns:
        Http cache type
    """
    return HTTP_CACHE_TYPE.inverse[self.httpCacheType()]

Return current persistent cookie policy.

Source code in prettyqt\webenginecore\webengineprofile.py
def get_persistent_cookie_policy(self) -> PersistentCookiePolicyStr:
    """Return current persistent cookie policy.

    Returns:
        Persistent cookie policy
    """
    return PERSISTENT_COOKIE_POLICY.inverse[self.persistentCookiesPolicy()]

set_http_cache_type(typ: HttpCacheTypeStr | mod.PersistentCookiesPolicy)

Set the http cache type.

Parameters:

Name Type Description Default
typ HttpCacheTypeStr | PersistentCookiesPolicy

http cache type

required
Source code in prettyqt\webenginecore\webengineprofile.py
def set_http_cache_type(self, typ: HttpCacheTypeStr | mod.PersistentCookiesPolicy):
    """Set the http cache type.

    Args:
        typ: http cache type
    """
    self.setHttpCacheType(HTTP_CACHE_TYPE.get_enum_value(typ))

Set the persistent cookie policy.

Parameters:

Name Type Description Default
policy PersistentCookiePolicyStr | PersistentCookiesPolicy

persistent cookie policy

required
Source code in prettyqt\webenginecore\webengineprofile.py
def set_persistent_cookie_policy(
    self, policy: PersistentCookiePolicyStr | mod.PersistentCookiesPolicy
):
    """Set the persistent cookie policy.

    Args:
        policy: persistent cookie policy
    """
    self.setPersistentCookiesPolicy(PERSISTENT_COOKIE_POLICY.get_enum_value(policy))

⌗ Property table

Qt Property Type Doc
objectName QString