QWebEngineScriptCollection

The QWebEngineScriptCollection class represents a collection of user scripts. More

Inheritance diagram of PySide2.QtWebEngineWidgets.QWebEngineScriptCollection

Synopsis

Functions

Detailed Description

QWebEngineScriptCollection manages a set of user scripts.

Use scripts() and scripts() to access the collection of scripts associated with a single page or a number of pages sharing the same profile.

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.clear()

Removes all scripts from this collection.

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.contains(value)
Parameters

valueQWebEngineScript

Return type

bool

Returns true if the collection contains an occurrence of value ; otherwise returns false .

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.count()
Return type

int

Returns the number of elements in the collection.

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.findScript(name)
Parameters

name – unicode

Return type

QWebEngineScript

Returns the first script found in the collection with the name name , or a null QWebEngineScript if none was found.

Note

The order in which the script collection is traversed is undefined, which means this should be used when the unicity is guaranteed at the application level.

See also

findScripts()

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.findScripts(name)
Parameters

name – unicode

Return type

Returns the list of scripts in the collection with the name name , or an empty list if none was found.

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.insert(list)
Parameters

list

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.insert(arg__1)
Parameters

arg__1QWebEngineScript

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.isEmpty()
Return type

bool

Returns true if the collection is empty; otherwise returns false .

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.remove(arg__1)
Parameters

arg__1QWebEngineScript

Return type

bool

Removes script from the collection.

Returns true if the script was found and successfully removed from the collection; otherwise returns false .

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.size()
Return type

int

Returns the number of elements in the collection.

PySide2.QtWebEngineWidgets.QWebEngineScriptCollection.toList()
Return type

Returns a list with the values of the scripts used in this collection.