PDA

View Full Version : Camera error



alfah
18th July 2011, 08:23
I've been tryin to make a prog to set flash on. I managed to run it on a Nokia C7 with out any compilation errors, but when I click the push button to set flash on I get the following error:

[Qt Message] Camera error: "Failed to set flash mode."

The code I've used is:

QCamera *camera = new QCamera;
QCameraExposure *cameraexpo = camera->exposure();
cameraexpo->setFlashMode(QCameraExposure::FlashOn);
I use Qt 4.7.4 with Qt Creator 2.2.0.

mvuori
18th July 2011, 09:17
Try QCameraExposure::isFlashModeSupported ( FlashModes mode ) to see whether the developers have forgotten that flash mode from the Qt interface (which apparently is not so uncommon) or whether it just doesn't work.