How to set the camera flash on
-
@QCameraExposure * QCamera::exposure () const@
Returns the camera exposure control object.
Sorry I'm a bit late :) -
:) thanks lukas
bein a newbie am i dealin with tough stuff????? :(
cuz now i get jus one error and it says "
"request for member setFlashMode in cameraexpo, which is of non class type 'QCameraExposure' "
this is the code ive used in the function
{ QCamera *camera = new QCamera;
QCameraExposure *cameraexpo = camera->exposure();
cameraexpo.setFlashMode(QCameraExposure::FlashOn);}
regards,
-
hey kkrzewniak
thank you, but i could not make head or tail of that oneliner code. :)
It returns a camera exposure ctrl obj? meanin?
regards,
P.S one basic question, is it necessary to switch on the camera to set flash on??
regards,
-
Have you included the QCameraExposure header?
@
#include <QCameraExposure>
@ -
It's
@
cameraexpo->setFlashMode(QCameraExposure::FlashOn);
@
not
@
cameraexpo.setFlashMode(QCameraExposure::FlashOn);
@ -
@loladiro,
thanks! -> did the trick!! i finally got the prog running on c7 with out errors.@lukas, loladiro, kkrzewniak
:( but then, when FlashOn was used i got the following msg
[Qt Message] camera error: "failed to set flash mode" :( :(When i tried to use FlashTorch, i got
[Qt Message] Camera error: "Requested flash mode is not supported." :( :(so wat next???
but there are apps which run in c7 which uses flash as torch!!!!!
thanks a lot for the help;
-
Did anyone found a solution how to use camera LED as torch in Qt applications?
All suggested solutions like using setFlashMode(bla-bla-bla) doesn't work. But there are a lot of torches for Symbian and Meego... There are should be low-level platform for that trick I guess. But how to find it?
-
take shot in bright place so that you don't need flash
-
It's not about taking pictures. It about - how to use phone as torch.
-
To set the camera flash mode, you need to wait until the camera is initialized. So, connect a slot to the QCamera::statusChanged(QCamera::Status) and in your slot, set the flash mode when the camera is in QCamera::ActiveStatus. I don't know if the torch thingy would work but flash should.
The other app with the torch thingy could probably be using native Symbian code to do it.