Skip to content

NetworkCookieJar

Qt Base Class: QNetworkCookieJar

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473573995856["network.NetworkCookieJar"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473573786992["QtNetwork.QNetworkCookieJar"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473573995856
  140713234304496 --> 1473299815024
  1473573786992 --> 1473573995856
  1473288842240 --> 1473573786992
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QNetworkCookieJar

Implements a simple jar of QNetworkCookie objects.

Source code in prettyqt\network\networkcookiejar.py
class NetworkCookieJar(core.ObjectMixin, QtNetwork.QNetworkCookieJar):
    """Implements a simple jar of QNetworkCookie objects."""

    def __add__(self, other: QtNetwork.QNetworkCookie):
        self.insertCookie(other)
        return self

    def __getitem__(self, url: datatypes.UrlType) -> list[QtNetwork.QNetworkCookie]:
        url = core.Url(url)
        return self.cookiesForUrl(url)

    def __repr__(self):
        return get_repr(self)

    def __iter__(self) -> Iterator[QtNetwork.QNetworkCookie]:
        return iter(self.allCookies())

    def set_cookies_from_url(
        self, cookies: list[QtNetwork.QNetworkCookie], url: datatypes.UrlType
    ) -> bool:
        return self.setCookiesFromUrl(cookies, core.QUrl(url))

⌗ Property table

Qt Property Type Doc
objectName QString