I'm trying to identify if a QCamera has a flash. Ideally, I'd like this done in QML, but there seems to be no support for it yet. So I'm making a QML type in C++.
So in C++: qDebug() << "Default:" << QCameraInfo::defaultCamera().deviceName() << QCameraInfo::defaultCamera().position(); camera = new QCamera(); if (camera) { QCameraExposure *exp = camera->exposure(); if (exp) { qDebug() << "QCamera ok, returning flash modes" << exp->isFlashModeSupported(QCameraExposure::FlashOn) << exp->isFlashModeSupported(QCameraExposure::FlashAuto) << exp->isFlashModeSupported(QCameraExposure::FlashManual); return exp->isFlashModeSupported(QCameraExposure::FlashOn); } } Default: "com.apple.avfoundation.avcapturedevice.built-in_video:0" QCamera::BackFace However all I ever get is false. This is being run on an iPhone 5S, which does have a backface flash, and I do use the flash successfully in QML. I'm attempting to also support iPads which do not have a flash at all, but I need to know that the flash does not work. Does anyone know what I might be doing wrong? _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest