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

자세한 설명

웹 애플리케이션이 디스플레이의 콘텐츠를 캡처할 수 있도록 하려면, 애플리케이션은 QWebEngineDesktopMediaRequest 인스턴스를 인수로 받는 QWebEnginePage::desktopMediaRequested 에 연결해야 합니다.

웹 애플리케이션이 디스플레이 콘텐츠에 대한 액세스를 요청하면 QWebEnginePage::desktopMediaRequested 이 캡처할 수 있는 사용 가능한 창 및 화면에 대한 QAbstractListModels에 대한 참조를 포함하는 QWebEngineDesktopMediaRequest 인스턴스를 인수로 사용하여 전송됩니다.

데이터 모델의 Qt::DisplayRole은 창 제목 또는 디스플레이 번호인 소스 이름을 지정합니다. 사용 가능한 소스 목록이 변경된 경우(예: 창이 열리거나 닫힐 때) 모델은 동적으로 업데이트됩니다.

그런 다음 신호 핸들러는 selectScreen() 또는 selectWindow()를 호출하여 요청을 수락하고 화면 공유를 시작해야 합니다.

QWebEnginePage::desktopMediaRequested()도 참조하세요 .

멤버 함수 문서

[invokable] void QWebEngineDesktopMediaRequest::cancel() const

요청을 거부합니다. 화면 캡처가 중단됩니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

QAbstractListModel *QWebEngineDesktopMediaRequest::screensModel() const

사용 가능한 화면에 대해 QAbstractListModel 를 반환합니다.

참고: 속성 스크린 모델에 대한 겟터 함수.

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.