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

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)

    target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)

  • qmake: QT += webenginecore

  • Inherited By:

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.

QList<QWebEngineScript> QWebEngineScriptCollection::find(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.

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+