- Qt 5.5
- Qt WebEngine Widgets
- C++ Classes
- QWebEngineScriptCollection
- Qt 5.5.1 Reference Documentation

# QWebEngineScriptCollection Class

The QWebEngineScriptCollection class represents a collection of user scripts. More...

Header: | #include <QWebEngineScriptCollection>
qmake: | QT += webenginewidgets
Since: | Qt 5.5

- List of all members, including inherited members

## Public Functions

| ~QWebEngineScriptCollection()
void | clear()
bool | contains(const QWebEngineScript & value) const
int | count() const
QWebEngineScript | findScript(const QString & name) const
QList<QWebEngineScript> | findScripts(const QString & name) const
void | insert(const QWebEngineScript & s)
void | insert(const QList<QWebEngineScript> & list)
bool | isEmpty() const
bool | remove(const QWebEngineScript & script)
int | size() const
QList<QWebEngineScript> | toList() const

## Detailed Description

The QWebEngineScriptCollection class represents a collection of user scripts.

## Member Function Documentation

### QWebEngineScriptCollection::~QWebEngineScriptCollection()

### void QWebEngineScriptCollection::clear()

QWebEngineScriptCollection::clear Removes all scripts from this collection.

### bool QWebEngineScriptCollection::contains(const QWebEngineScript & value) const

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

### int QWebEngineScriptCollection::count() const

QWebEngineScriptCollection::count Returns the number of elements in the collection.

### QWebEngineScript QWebEngineScriptCollection::findScript(const QString & name) const

QWebEngineScriptCollection::findScript name Returns the first script found in collection the name property of which is 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().

### QList<QWebEngineScript> QWebEngineScriptCollection::findScripts(const QString & name) const

QWebEngineScriptCollection::findScripts name Returns the list of scripts in the collection the name property of which is name, or an empty list if none was found.

### void QWebEngineScriptCollection::insert(const QWebEngineScript & s)

QWebEngineScriptCollection::insert s

Inserts script `s` into the collection.

### void QWebEngineScriptCollection::insert(const QList<QWebEngineScript> & list)

QWebEngineScriptCollection::insert list

Inserts scripts `list` into the collection.

### bool QWebEngineScriptCollection::isEmpty() const

### bool QWebEngineScriptCollection::remove(const QWebEngineScript & script)

QWebEngineScriptCollection::remove script Removes script from the collection, if it is present. Returns `true` if the script was found and successfully removed from the collection, `false` otherwise.

### int QWebEngineScriptCollection::size() const

### QList<QWebEngineScript> QWebEngineScriptCollection::toList() const

QWebEngineScriptCollection::toList Returns a QList with the values of the scripts used in this collection.