Skip to content

WebEngineUrlScheme

Qt Base Class: QWebEngineUrlScheme

Signature: QWebEngineUrlScheme(self) -> None QWebEngineUrlScheme(self, name: Union[PySide6.QtCore.QByteArray, bytes]) -> None QWebEngineUrlScheme(self, that: PySide6.QtWebEngineCore.QWebEngineUrlScheme) -> None

Base classes

Name Children Inherits
QWebEngineUrlScheme
PySide6.QtWebEngineCore
QWebEngineUrlScheme(self) -> None

⋔ Inheritance diagram

graph TD
  1473574732736["webenginecore.WebEngineUrlScheme"]
  1473574592192["QtWebEngineCore.QWebEngineUrlScheme"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473574592192 --> 1473574732736
  1473291690208 --> 1473574592192
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QWebEngineUrlScheme

Source code in prettyqt\webenginecore\webengineurlscheme.py
class WebEngineUrlScheme(QtWebEngineCore.QWebEngineUrlScheme):
    def get_name(self) -> str:
        return self.name().data().decode()

    @classmethod
    def get_scheme_by_name(cls, name: datatypes.ByteArrayType) -> Self:
        scheme = cls.schemeByName(datatypes.to_bytearray(name))
        return cls(scheme)

    def set_name(self, name: datatypes.ByteArrayType):
        self.setName(datatypes.to_bytearray(name))

    def set_syntax(self, syntax: SyntaxStr | QWebEngineUrlScheme.Syntax):
        """Set syntax.

        Args:
            syntax: syntax to use
        """
        self.setSyntax(SYNTAX.get_enum_value(syntax))

    def get_syntax(self) -> SyntaxStr:
        """Return syntax.

        Returns:
            syntax
        """
        return SYNTAX.inverse[self.syntax()]

get_syntax() -> SyntaxStr

Return syntax.

Source code in prettyqt\webenginecore\webengineurlscheme.py
def get_syntax(self) -> SyntaxStr:
    """Return syntax.

    Returns:
        syntax
    """
    return SYNTAX.inverse[self.syntax()]

set_syntax(syntax: SyntaxStr | QWebEngineUrlScheme.Syntax)

Set syntax.

Parameters:

Name Type Description Default
syntax SyntaxStr | Syntax

syntax to use

required
Source code in prettyqt\webenginecore\webengineurlscheme.py
def set_syntax(self, syntax: SyntaxStr | QWebEngineUrlScheme.Syntax):
    """Set syntax.

    Args:
        syntax: syntax to use
    """
    self.setSyntax(SYNTAX.get_enum_value(syntax))