QWebEngineExtensionInfo Class

The QWebEngineExtensionInfo provides information about a browser extension. 更多...

头: #include <QWebEngineExtensionInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.10

特性

公共函数

QUrl actionPopupUrl () const
QString description () const
QString error () const
QString id () const
bool isEnabled () const
bool isInstalled () const
bool isLoaded () const
QString name () const
QString path () const

详细描述

QWebEngineExtensionInfo provides information of an extension loaded into Qt WebEngine. Extensions can be loaded via the QWebEngineExtensionManager . You can check if the extension was successfully loaded using its isLoaded () property. The error () property contains error messages if the loading process failed. Extensions are always loaded in disabled state. To run an extension, it has to be enabled via QWebEngineExtensionManager::setExtensionEnabled ().

An extension can be removed using QWebEngineExtensionManager::unloadExtension ().

You can access extensions with QWebEngineExtensionManager::extensions () which provides a list of the loaded extensions, or connect to the manager's signals to be notified if the loading process is complete.

另请参阅 QWebEngineExtensionManager and QWebEngineProfile::extensionManager ().

特性文档编制

[read-only] actionPopupUrl : const QUrl

Returns the url of the extension's popup.

Extension developers usually provide a popup menu where users can control their extension. The menu can be accessed via this url.

Empty if the load failed.

访问函数:

QUrl actionPopupUrl () const

[read-only] description : const QString

This property holds the description of the extension.

Acquired from the extension's manifest file's description property.

Empty if the load failed.

访问函数:

QString 描述 () const

[read-only] error : const QString

Errors happened during loading, installing or uninstalling the extension.

Multiple errors can happen during load time, like missing manifest, invalid file format or path. The loading process stops at the first error.

Empty if the load succeeded.

访问函数:

QString error () const

[read-only] id : const QString

This property holds the id of the extension.

Generated at load time. Multiple QWebEngineExtensionInfo objects with the same id represent the same underlying extension.

The id is generated from the filesystem path where the extension was loaded from and the extensions manfiest file. Loading the same extension from the same path always have the same id.

Empty if the load failed.

访问函数:

QString id () const

[read-only] isEnabled : const bool

This property holds whether the extension is enabled.

访问函数:

bool isEnabled () const

另请参阅 QWebEngineExtensionManager::setExtensionEnabled ().

[read-only] isLoaded : const bool

This property holds whether the extension is loaded.

If the extension was loaded or installed successfully this property returns true . Returns false if the extension was unloaded, uninstalled or the loading process failed.

访问函数:

bool isLoaded () const

另请参阅 QWebEngineExtensionManager::loadExtension () 和 QWebEngineExtensionManager::unloadExtension ().

[read-only] 名称 : const QString

This property holds the name of the extension.

Acquired from the extension's manifest file's name property.

Empty if the load failed.

访问函数:

QString 名称 () const

[read-only] path : const QString

This property holds the install path of the extension.

The filesystem path where the extension was loaded from.

访问函数:

QString path () const