This is not working. So In QML, I start the backface camera, and it grabs viewfinder frames. I then call my C++ object which has this function: bool FlashControl::isFlashSupported(){ camera = new QCamera(QCamera::BackFace); 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); } else qDebug() << "has QCamera, no exp"; } else qDebug() << "no QCamera"; return false; } Which then prints all falses and returns false itself, even on a camera that has a working flash (Nexus6). What am I still doing wrong? > Sent: Tuesday, July 21, 2015 at 9:19 AM > From: "Lopes Yoann" <yoann.lo...@theqtcompany.com> > To: "Jason H" <jh...@gmx.com> > Cc: interest <interest@qt-project.org> > Subject: Re: [Interest] QCamera flash modes > > > On 20 Jul 2015, at 21:34, Jason H <jh...@gmx.com> wrote: > > > > 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? > > You need to start the camera before being able to query for its capabilities. > > — > Yoann > > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest