QWebEngineMediaSourceModel Class

A data model that represents display sources for screen capturing. More...

Header: #include <QWebEngineMediaSourceModel>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.7
Inherits: QAbstractListModel

Detailed Description

The QWebEngineMediaSourceModel exposes the name Role. The name role specifies the name of the source which is the title of a window or the number of the display. The model is dynamically updates if the available list of sources has changed e.g a window is opened/closed.

This type is uncreatable, it can only be accessed from a QWebEngineDesktopMediaRequest.

See also QWebEngineDesktopMediaRequest::windowsModel() and QWebEngineDesktopMediaRequest::screensModel().