QWebEngineProfileBuilder Class
QWebEngineProfileBuilder クラスは、QWebEngineProfile を構築する方法を提供します。詳細...
ヘッダー | #include <QWebEngineProfileBuilder> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
以来: | Qt 6.9 |
パブリック関数
QWebEngineProfile * | createProfile(const QString &storageName, QObject *parent = nullptr) const |
QWebEngineProfileBuilder & | setCachePath(const QString &path) |
QWebEngineProfileBuilder & | setHttpCacheMaximumSize(int maxSizeInBytes) |
QWebEngineProfileBuilder & | setHttpCacheType(QWebEngineProfile::HttpCacheType httpCacheType) |
QWebEngineProfileBuilder & | setPersistentCookiesPolicy(QWebEngineProfile::PersistentCookiesPolicy persistentCookiePolicy) |
QWebEngineProfileBuilder & | setPersistentPermissionsPolicy(QWebEngineProfile::PersistentPermissionsPolicy persistentPermissionPolicy) |
QWebEngineProfileBuilder & | setPersistentStoragePath(const QString &path) |
静的パブリックメンバ
QWebEngineProfile * | createOffTheRecordProfile(QObject *parent = nullptr) |
詳しい説明
QWebEngineProfileBuilder は、QWebEngineProfile クラスのインスタンスを作成します。一部のプロファイルのプロパティは 1 回の呼び出しで初期化する必要があり、プロファイルの有効期間中に変更すべきではありません。Webエンジンプロファイルビルダーは、単にそれを保護します。
メンバ関数のドキュメント
[static]
QWebEngineProfile *QWebEngineProfileBuilder::createOffTheRecordProfile(QObject *parent = nullptr)
親オブジェクトparent 、ローカルマシンに記録を残さず、永続データやキャッシュを持たない、off-the-recordプロファイルを作成します。これにより、クッキー、永続データ、HTTPキャッシュがメモリに保存されます。
QWebEngineProfile *QWebEngineProfileBuilder::createProfile(const QString &storageName, QObject *parent = nullptr) const
ストレージ名storageName および親parent を持つプロファイルを構築します。
ストレージ名は、各ディスクベースのプロファイルに、永続データとキャッシュ用の個別のサブディレクトリを与えるために使用されます。ストレージの場所は、アプリケーションのライフタイム中、一意でなければなりません。ブラウザのキャッシュが破損する可能性があるため、同じストレージの場所を持つプロファイルを作成しないようにするのはユーザー次第です。
QWebEngineProfile そうしないと、キャッシュと永続データがディスクに完全にフラッシュされない可能性があります。
注意: ディスクベースのプロファイルを作成する際、データパスが既に他のプロファイルによって使用されている場合、この関数は null ポインタを返します。
QWebEngineProfile::storageName()も参照してください 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setCachePath(const QString &path)
キャッシュに使用するパスをpath に設定します。
デフォルトでは、QtWebengine/StorageName 固有のサブディレクトリの StandardPaths::CacheLocation 以下になります。
注意: QStandardPaths::CacheLocation のパスを取得するにはQStandardPaths::writableLocation(QStandardPaths::CacheLocation) を使用します。
QWebEngineProfile::cachePath() およびQStandardPaths::writableLocation()も参照してください 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setHttpCacheMaximumSize(int maxSizeInBytes)
HTTPキャッシュの最大サイズをmaxSizeInBytes バイトに設定する。
0
に設定すると、サイズはQtWebEngine によって自動的に制御されます。
QWebEngineProfile::httpCacheMaximumSize() およびsetHttpCacheType()も参照 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setHttpCacheType(QWebEngineProfile::HttpCacheType httpCacheType)
HTTPキャッシュ・タイプをhttpCacheType に設定する。
QWebEngineProfile::httpCacheType() およびsetCachePath()も参照 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setPersistentCookiesPolicy(QWebEngineProfile::PersistentCookiesPolicy persistentCookiePolicy)
永続的クッキーのポリシーをpersistentCookiePolicy に設定する。
QWebEngineProfile::persistentCookiesPolicy()も参照 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setPersistentPermissionsPolicy(QWebEngineProfile::PersistentPermissionsPolicy persistentPermissionPolicy)
永続パーミッションのポリシーをpersistentPermissionPolicy に設定する。
QWebEngineProfile::persistentPermissionsPolicy()も参照 。
QWebEngineProfileBuilder &QWebEngineProfileBuilder::setPersistentStoragePath(const QString &path)
ブラウザとウェブコンテンツの永続データの保存に使用するパスをpath に設定します。永続的なデータには、永続的なクッキー、HTML5 ローカルストレージ、訪問したリンクが含まれます。
デフォルトでは、QtWebengine/StorageName 固有のサブディレクトリの QStandardPaths::DataLocation 以下になります。
注: QStandardPaths::DataLocation のパスを取得するには、QStandardPaths::writableLocation(QStandardPaths::DataLocation) を使用してください。
QWebEngineProfile::persistentStoragePath() およびQStandardPaths::writableLocation()も参照してください 。
© 2025 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.