QWebEngineScriptCollection 類錶示一批用戶腳本。 更多...
| 頭: | #include <QWebEngineScriptCollection> |
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
| qmake: | QT += webenginecore |
| ~QWebEngineScriptCollection () | |
| void | clear () |
| bool | contains (const QWebEngineScript & value ) const |
| int | count () const |
| QList<QWebEngineScript> | find (const QString & name ) const |
| void | insert (const QWebEngineScript & s ) |
| void | insert (const QList<QWebEngineScript> & list ) |
| bool | isEmpty () const |
| bool | remove (const QWebEngineScript & script ) |
| QList<QWebEngineScript> | toList () const |
QWebEngineScriptCollection 管理用戶腳本集。
使用 QWebEnginePage::scripts () 和 QWebEngineProfile::scripts () 能訪問與單個頁麵 (或共享同一 Profile 的多個頁麵) 關聯的腳本集閤。
另請參閱 腳本注入 .
銷毀集閤。
從此集閤移除所有腳本。
返迴
true
若集閤包含齣現的
value
;否則返迴
false
.
返迴集閤中的元素數。
返迴腳本列錶在集閤中具有名稱 name ,或空列錶若沒有找到。
插入腳本 s 進集閤。
插入腳本從列錶 list 進集閤。
返迴
true
若集閤為空;否則返迴
false
.
移除 script 從集閤。
返迴
true
若找到腳本並將其成功從集閤中移除;否則返迴
false
.
返迴用於此集閤的腳本值的列錶。