IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QWebEngineScriptCollection Class

The QWebEngineScriptCollection class represents a collection of user scripts.

This class was introduced in Qt 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QWebEngineScriptCollection Class

  • Header: QWebEngineScriptCollection

  • Since: Qt 5.5

  • qmake: QT += webenginewidgets

Detailed Description

QWebEngineScriptCollection manages a set of user scripts.

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

See Also

See also Script Injection

Member Function Documentation

 

QWebEngineScriptCollection::~QWebEngineScriptCollection()

Destroys the collection.

void QWebEngineScriptCollection::clear()

Removes all scripts from this collection.

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

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

int QWebEngineScriptCollection::count() const

Returns the number of elements in the collection.

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

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

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

See also findScripts()

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

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

void QWebEngineScriptCollection::insert(const QWebEngineScript &s)

Inserts the script s into the collection.

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

Inserts scripts from the list list into the collection.

bool QWebEngineScriptCollection::isEmpty() const

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

bool QWebEngineScriptCollection::remove(const QWebEngineScript &script)

Removes script from the collection.

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

int QWebEngineScriptCollection::size() const

Returns the number of elements in the collection.

QList<QWebEngineScript> QWebEngineScriptCollection::toList() const

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+