QCameraViewfinder 类

The QCameraViewfinder class provides a camera viewfinder widget. 更多...

头: #include <QCameraViewfinder>
qmake: QT += multimediawidgets
继承: QVideoWidget

公共函数

QCameraViewfinder (QWidget * parent = nullptr)
virtual ~QCameraViewfinder ()

重实现公共函数

virtual QMediaObject * mediaObject () const override

静态公共成员

const QMetaObject staticMetaObject

重实现保护函数

virtual bool setMediaObject (QMediaObject * object ) override

额外继承成员

详细描述

The QCameraViewfinder class provides a camera viewfinder widget.

camera = new QCamera;
viewfinder = new QCameraViewfinder();
viewfinder->show();
camera->setViewfinder(viewfinder);
imageCapture = new QCameraImageCapture(camera);
camera->setCaptureMode(QCamera::CaptureStillImage);
camera->start();
					

成员函数文档编制

QCameraViewfinder:: QCameraViewfinder ( QWidget * parent = nullptr)

构造新的摄像头取景器 Widget。

The parent 会被传递给 QVideoWidget .

[虚拟] QCameraViewfinder:: ~QCameraViewfinder ()

销毁摄像头取景器 Widget。

[override virtual] QMediaObject *QCameraViewfinder:: mediaObject () const

重实现自 QVideoWidget::mediaObject ().

另请参阅 setMediaObject ().

[override virtual protected] bool QCameraViewfinder:: setMediaObject ( QMediaObject * object )

另请参阅 mediaObject ().