Using device camera without Qt Mobility
-
Hey
I wanted to know is there any other way to access device camera in a symbian phone through a Qt application without using Qt Mobility. I read that the camera api has been removed form Qt Mobility. Please help me out -
The camera API is available at "Qt Mobility 1.2.2 documentation":http://doc.qt.nokia.com/qtmobility/multimedia.html#camera-support. But if you insist on not using it as an alternative you combine "Symbian C++ camera API":http://www.developer.nokia.com/info/sw.nokia.com/id/1cde08b0-1f57-41ba-851b-776c43fdec6c/S60_Platform_Camera_Example_v3_0_en.zip.html with Qt.
-
after making the following changes
.pro file
CONFIG += MOBILITY
MOBILITY += multimedia
symbian:TARGET.CAPABILITY = UserEnviornmenti am still not able to create objects for the QStillImageCapture Class.
-
Did you run qmake after changing the pro file? What error did you get?
-
yep i ran it, i gives the error QStillImageCapture not declared in this scope. in the headers i have included Qcamera, QCameraViewFinder, QMediaObject, QObject, QVideoWidget. Am i missing any header files?????
-
If you use Qt Mobility 1.2.2 you should use the following approach to "capture a still image":http://doc.qt.nokia.com/qtmobility/multimedia.html#still-images.
@
camera = new QCamera;
viewFinder = new QCameraViewfinder();
viewFinder->show();camera->setViewfinder(viewFinder); imageCapture = new QCameraImageCapture(camera); camera->setCaptureMode(QCamera::CaptureStillImage); camera->start(); //on half pressed shutter button camera->searchAndLock(); ... //on shutter button pressed imageCapture->capture(); //on shutter button released camera->unlock();
@
-
i am using qt mobility 1.2.0 what is the alternative for QCameraImageCapture here??
-
hey lenon.anavi did it, included the header. One last thing, where is this image stored?