The QCameraViewfinder class provides a camera viewfinder widget. 更多...
头: | #include <QCameraViewfinder> |
qmake: | QT += multimediawidgets |
继承: | QVideoWidget |
QCameraViewfinder (QWidget * parent = Q_NULLPTR) | |
~QCameraViewfinder () |
virtual QMediaObject * | mediaObject () const override |
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 .
销毁摄像头取景器 Widget。
[override virtual]
QMediaObject
*QCameraViewfinder::
mediaObject
() const
重实现自 QMediaBindableInterface::mediaObject ().
另请参阅 setMediaObject ().
[override virtual protected]
bool
QCameraViewfinder::
setMediaObject
(
QMediaObject
*
object
)
重实现自 QMediaBindableInterface::setMediaObject ().
另请参阅 mediaObject ().