Profiles can be used to isolate pages from each other. PersistentCookiesPolicy describes whether session and persistent cookies are saved to and restored from memory or disk. The cache can be cleared of links by calling clearVisitedLinks() or clearAllVisitedLinks(). If you set any of the values manually, you should do it before creating any pages that belong to the profile. If only the storage name is set, the subdirectories are created and named automatically. The cache type can be set to in-memory or on-disk by calling setHttpCacheType(). Persistent data is stored in a subdirectory set by calling setPersistentStoragePath(), and the cache is located in a subdirectory set by calling setCachePath(). Information about visited links is stored together with persistent cookies and other persistent data in a storage returned by storageName(). Likewise, the scripts() method provides access to a common QWebEngineScriptCollection instance. The QWebEngineProfile class provides a web engine profile shared by multiple pages.Ī web engine profile contains settings, scripts, persistent cookie policy, and the list of visited links shared by all web engine pages that belong to the profile.Īll pages that belong to the profile share a common QWebEngineSettings instance, which can be accessed with the settings() method. 31 public functions inherited from QObject.VisitedLinksContainsUrl(const QUrl & url) const UrlSchemeHandler(const QByteArray & scheme) const SetSpellCheckLanguages(const QStringList & languages) SetRequestInterceptor(QWebEngineUrlRequestInterceptor * interceptor) SetPersistentStoragePath(const QString & path) SetPersistentCookiesPolicy(QWebEngineProfile::PersistentCookiesPolicy newPersistentCookiesPolicy) SetHttpUserAgent(const QString & userAgent) ![]() SetHttpCacheType(QWebEngineProfile::HttpCacheType httpCacheType) SetHttpAcceptLanguage(const QString & httpAcceptLanguage) RemoveUrlSchemeHandler(QWebEngineUrlSchemeHandler * handler) RemoveUrlScheme(const QByteArray & scheme) QWebEngineProfile::PersistentCookiesPolicy InstallUrlSchemeHandler(const QByteArray & scheme, QWebEngineUrlSchemeHandler * handler) ![]() QWebEngineProfile(const QString & storageName, QObject * parent = Q_NULLPTR) QWebEngineProfile(QObject * parent = Q_NULLPTR)
0 Comments
Leave a Reply. |