Does Qt5.3 beta support qt-android camera in C++ ?
-
Hi , everyone
These days ,i want to test the camera functions in qt android . I test the camera demo , and it is only useful in windows. I make a camera test demo by myself , but it do not success in android phone.
My question is : does qt version now support android camera in C++ now ? ( i do not want to use QML)
thank very much !
Here is some core code about my test demo .@
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();foreach (const QCameraInfo &cameraInfo, cameras) { qDebug()<< cameraInfo.deviceName(); if((cameraInfo.deviceName()=="front") ) { camera = new QCamera(cameraInfo); } } camera->setCaptureMode(QCamera::CaptureStillImage);
view_finder = new QCameraViewfinder();
camera->setViewfinder(view_finder);
camera_image_capture = new QCameraImageCapture(camera);
camera->start();
@[edit: added missing coding tags @ SGaist]
-
http://qt-project.org/wiki/Qt_for_Android_known_issues
Since the multimedia widgets module is not supported in 5.3 android, you can't view the real-time camera feed with just QWidgets, AFAIK you will need to use QML for that.
I was able to run the camera example on 5.2.1 and take pictures with a Samsung Note 2, but the live camera feed was blank.
I don't know what the situation will be on 5.3 release.
-
Oh. thank you ! it's seems i have to learn QML now , ^_^
[quote author="ltr6" date="1400139561"]http://qt-project.org/wiki/Qt_for_Android_known_issues Since the multimedia widgets module is not supported in 5.3 android, you can't view the real-time camera feed with just QWidgets, AFAIK you will need to use QML for that. I was able to run the camera example on 5.2.1 and take pictures with a Samsung Note 2, but the live camera feed was blank. I don't know what the situation will be on 5.3 release.[/quote]