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();
构造新的摄像头取景器 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 ().