Table of Contents
- QWebEngineCookieStore
- Synopsis
- Detailed Description
PySide2.QtWebEngineCore.QWebEngineCookieStore
PySide2.QtWebEngineCore.QWebEngineCookieStore.cookieAdded()
PySide2.QtWebEngineCore.QWebEngineCookieStore.cookieRemoved()
PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteAllCookies()
PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteCookie()
PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteSessionCookies()
PySide2.QtWebEngineCore.QWebEngineCookieStore.loadAllCookies()
PySide2.QtWebEngineCore.QWebEngineCookieStore.setCookie()
Previous topic
Next topic
Quick search
QWebEngineCookieStore¶
The
QWebEngineCookieStore
class provides access to Chromium’s cookies. More…
Synopsis¶
Functions¶
def
deleteAllCookies
()def
deleteCookie
(cookie[, origin=QUrl()])def
deleteSessionCookies
()def
loadAllCookies
()def
setCookie
(cookie[, origin=QUrl()])
Signals¶
def
cookieAdded
(cookie)def
cookieRemoved
(cookie)
Detailed Description¶
The class allows to access HTTP cookies of Chromium for a specific profile. It can be used to synchronize cookies of Chromium and the
QNetworkAccessManager
, as well as to set, delete, and intercept cookies during navigation. Because cookie operations are asynchronous, the user can choose to provide a callback function to get notified about the success of the operation. The signal handlers for removal and addition should not be used to execute heavy tasks, because they might block the IO thread in case of a blocking connection.Use
cookieStore()
andcookieStore()
to access the cookie store object for a specific profile.
- class PySide2.QtWebEngineCore.QWebEngineCookieStore¶
- PySide2.QtWebEngineCore.QWebEngineCookieStore.cookieAdded(cookie)¶
- Parameters:
cookie –
PySide2.QtNetwork.QNetworkCookie
- PySide2.QtWebEngineCore.QWebEngineCookieStore.cookieRemoved(cookie)¶
- Parameters:
cookie –
PySide2.QtNetwork.QNetworkCookie
- PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteAllCookies()¶
Deletes all the cookies in the cookie store.
Note
This operation is asynchronous.
See also
- PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteCookie(cookie[, origin=QUrl()])¶
- Parameters:
cookie –
PySide2.QtNetwork.QNetworkCookie
origin –
PySide2.QtCore.QUrl
Deletes
cookie
from the cookie store. It is possible to provide an optionalorigin
URL argument to limit the scope of the cookie to be deleted.Note
This operation is asynchronous.
- PySide2.QtWebEngineCore.QWebEngineCookieStore.deleteSessionCookies()¶
Deletes all the session cookies in the cookie store. Session cookies do not have an expiration date assigned to them.
Note
This operation is asynchronous.
See also
- PySide2.QtWebEngineCore.QWebEngineCookieStore.loadAllCookies()¶
Loads all the cookies into the cookie store. The
cookieAdded()
signal is emitted on every loaded cookie. Cookies are loaded automatically when the store gets initialized, which in most cases happens on loading the first URL. However, calling this function is useful if cookies should be listed before entering the web content.Note
This operation is asynchronous.
- PySide2.QtWebEngineCore.QWebEngineCookieStore.setCookie(cookie[, origin=QUrl()])¶
- Parameters:
cookie –
PySide2.QtNetwork.QNetworkCookie
origin –
PySide2.QtCore.QUrl
Adds
cookie
to the cookie store.Note
If
cookie
specifies adomain()
that does not start with a dot, a dot is automatically prepended. To limit the cookie to the exact server, omitdomain()
and setorigin
instead.The provided URL should also include the scheme.
Note
This operation is asynchronous.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.