QCameraViewfinder 类提供摄像头取景器小部件。 更多...
头: | #include <QCameraViewfinder> |
qmake: | QT += multimediawidgets |
继承: | QVideoWidget |
QCameraViewfinder (QWidget * parent = nullptr) | |
virtual | ~QCameraViewfinder () |
virtual QMediaObject * | mediaObject () const override |
virtual bool | setMediaObject (QMediaObject * object ) override |
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
重实现: QMediaBindableInterface::mediaObject () const.
另请参阅 setMediaObject ().
[override virtual protected]
bool
QCameraViewfinder::
setMediaObject
(
QMediaObject
*
object
)
重实现: QMediaBindableInterface::setMediaObject (QMediaObject *object).
另请参阅 mediaObject ().