QWebEngineDesktopMediaRequest Class
スクリーンキャプチャ用の利用可能なソースをダイアログに入力するためのリクエスト。詳細...
ヘッダー | #include <QWebEngineDesktopMediaRequest> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
以来: | Qt 6.7 |
QML では | WebEngineDesktopMediaRequest |
パブリック関数
void | cancel() const |
QAbstractListModel * | screensModel() const |
void | selectScreen(const QModelIndex &index) const |
void | selectWindow(const QModelIndex &index) const |
QAbstractListModel * | windowsModel() const |
詳細説明
Web アプリケーションがディスプレイのコンテンツをキャプチャできるようにするには、アプリケーションは QWebEngineDesktopMediaRequest インスタンスを引数として受け取るQWebEnginePage::desktopMediaRequested に接続する必要があります。
Web アプリケーションがディスプレイのコンテンツへのアクセスを要求すると、QWebEnginePage::desktopMediaRequested に QWebEngineDesktopMediaRequest インスタンスが引数として渡され、キャプチャ可能な利用可能なウィンドウと画面の QAbstractListModels への参照が保持されます。
データモデルのQt::DisplayRoleは、ソース名(ウィンドウのタイトルまたはディスプレイの番号)を指定します。利用可能なソースのリストが変更された場合、モデルは動的に更新されます。
シグナルハンドラは、selectScreen() またはselectWindow() を呼び出して要求を受け入れ、スクリーン共有を開始する必要がある。
QWebEnginePage::desktopMediaRequested()も参照のこと 。
メンバ関数のドキュメント
[invokable]
void QWebEngineDesktopMediaRequest::cancel() const
要求を拒否します。画面キャプチャは中止されます。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
QAbstractListModel *QWebEngineDesktopMediaRequest::screensModel() const
利用可能なスクリーンのQAbstractListModel を返します。
注: プロパティ screensModel のゲッター関数です。
windowsModel()も参照してください 。
[invokable]
void QWebEngineDesktopMediaRequest::selectScreen(const QModelIndex &index) const
キャプチャするindex の画面を選択する。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照。
QWebEngineDesktopMediaRequest::selectWindow()も参照してください 。
[invokable]
void QWebEngineDesktopMediaRequest::selectWindow(const QModelIndex &index) const
キャプチャするウィンドウをindex で選択します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
QWebEngineDesktopMediaRequest::selectScreen()も参照 。
QAbstractListModel *QWebEngineDesktopMediaRequest::windowsModel() const
利用可能なウィンドウのQAbstractListModel を返す。
注: プロパティ windowsModel のゲッター関数。
screensModel()も参照してください 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.