QVideoWidget Class
QVideoWidget 클래스는 미디어 객체에 의해 생성된 비디오를 표시하는 위젯을 제공합니다. 더 보기...
Header: | #include <QVideoWidget> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS MultimediaWidgets) target_link_libraries(mytarget PRIVATE Qt6::MultimediaWidgets) |
qmake: | QT += multimediawidgets |
상속합니다: | QWidget |
속성
- aspectRatioMode : Qt::AspectRatioMode
- fullScreen : bool
공용 함수
QVideoWidget(QWidget *parent = nullptr) | |
virtual | ~QVideoWidget() override |
Qt::AspectRatioMode | aspectRatioMode() const |
bool | isFullScreen() const |
QVideoSink * | videoSink() const |
재구현된 공용 함수
virtual QSize | sizeHint() const override |
공용 슬롯
void | setAspectRatioMode(Qt::AspectRatioMode mode) |
void | setFullScreen(bool fullScreen) |
신호
void | aspectRatioModeChanged(Qt::AspectRatioMode mode) |
void | fullScreenChanged(bool fullScreen) |
재구현된 보호 함수
virtual bool | event(QEvent *event) override |
virtual void | hideEvent(QHideEvent *event) override |
virtual void | moveEvent(QMoveEvent *event) override |
virtual void | resizeEvent(QResizeEvent *event) override |
virtual void | showEvent(QShowEvent *event) override |
상세 설명
Q비디오위젯을 QMediaPlayer 또는 QCamera 에 연결하면 해당 객체의 비디오 또는 이미지 출력을 표시할 수 있습니다.
player = new QMediaPlayer; player->setSource(QUrl("http://example.com/myclip1.mp4")); videoWidget = new QVideoWidget; player->setVideoOutput(videoWidget); videoWidget->show(); player->play();
참고: 미디어 객체에는 한 번에 하나의 디스플레이 출력만 연결할 수 있습니다.
QCamera, QMediaPlayer, QGraphicsVideoItem 를참조하세요 .
속성 문서
aspectRatioMode : Qt::AspectRatioMode
화면 비율에 따라 동영상의 크기가 조정되는 방식입니다.
기능에 액세스합니다:
Qt::AspectRatioMode | aspectRatioMode() const |
void | setAspectRatioMode(Qt::AspectRatioMode mode) |
알림 신호:
void | aspectRatioModeChanged(Qt::AspectRatioMode mode) |
fullScreen : bool
이 속성은 비디오 표시가 창에 국한되는지 또는 전체 화면인지 여부를 보유합니다.
액세스 함수:
bool | isFullScreen() const |
void | setFullScreen(bool fullScreen) |
알림 신호:
void | fullScreenChanged(bool fullScreen) |
멤버 함수 문서
[explicit]
QVideoWidget::QVideoWidget(QWidget *parent = nullptr)
새 비디오 위젯을 생성합니다.
parent 은 QWidget 으로 전달됩니다.
[override virtual noexcept]
QVideoWidget::~QVideoWidget()
동영상 위젯을 삭제합니다.
[override virtual protected]
bool QVideoWidget::event(QEvent *event)
다시 구현합니다: QWidget::event(QEvent * 이벤트).
현재 이벤트 event. 기본 클래스 QWidget::event(QEvent *event) 함수의 값을 반환합니다.
[override virtual protected]
void QVideoWidget::hideEvent(QHideEvent *event)
다시 구현합니다: QWidget::hideEvent(QHideEvent * 이벤트).
숨기기 event 를 처리합니다.
[override virtual protected]
void QVideoWidget::moveEvent(QMoveEvent *event)
다시 구현합니다: QWidget::moveEvent(QMoveEvent * 이벤트).
이동을 처리합니다 event.
[override virtual protected]
void QVideoWidget::resizeEvent(QResizeEvent *event)
다시 구현합니다: QWidget::resizeEvent(QResizeEvent * 이벤트).
크기 조정 event 을 처리합니다.
[override virtual protected]
void QVideoWidget::showEvent(QShowEvent *event)
다시 구현합니다: QWidget::showEvent(QShowEvent * 이벤트).
event 쇼를 처리합니다.
[override virtual]
QSize QVideoWidget::sizeHint() const
속성에 대한 액세스 함수를 다시 구현합니다: QWidget::sizeHint.
현재 백엔드의 크기 힌트가 있는 경우 이를 반환하고, 그렇지 않으면 QWidget 의 크기 힌트를 반환합니다.
[invokable]
QVideoSink *QVideoWidget::videoSink() const
QVideoSink 인스턴스를 반환합니다.
참고: 이 함수는 메타객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
© 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.