1

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.

larsmoa
  • 12,604
  • 8
  • 62
  • 85
alfah
  • 2,077
  • 1
  • 31
  • 55

1 Answers1

2

Try checking

bool bIsSupported = cameraexpo->isFlashModeSupported(QCameraExposure::FlashOn);
bool bIsReady = cameraexpo->isFlashReady();

and display their results somewhere

Tim Meyer
  • 12,210
  • 8
  • 64
  • 97