Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QCameraImageCapture capturing images multiple times on Desktop but once on android--why is this?
I am trying to capture images using QCameraImageCapture.From the examples I have cooked up this piece of code:
QCamer *camera=new QCamera(this);
QCameraViewfinder * viewFinder=new QCameraViewfinder(this);
QVBoxLayout *viewFinderLayout=new QVBoxLayout(); viewFinderLayout->addWidget(viewFinder); ui->viewFinderWidget->setLayout(viewFinderLayout); camera->setViewfinder(viewFinder); camera->setCaptureMode(QCamera::CaptureStillImage); imageCapture=new QCameraImageCapture(camera); connect(imageCapture,SIGNAL(imageCaptured(int,QImage)), this,SLOT(imageCaptured(int,QImage))); connect(imageCapture,SIGNAL(imageSaved(int,QString)), this,SLOT(imageSaved(int,QString)));
and capturing the image and saving on my drive as follows:
//on shutter button pressed imageCapture->capture("H:\\agatebo\\image.png"); //on shutter button released camera->unlock();
When I compile this code for desktop and capture the image I noticed that the ImageCapture slot is called six times ,but when I compile it for Android it gets called once.Can anyone enlight me on what is causing this behaviour?
Thanks for your time.
Can't really give you an exact answer but this is typically a question of implementation in the backend and it could also be hardware dependent.
Thanks for the reply .The focus right now is on the android and ios version,will dig more on the desktop side when the time allows.By the way is there any part of the Qt doc that covers the basics of Qt development on mobile devices?Our application is done in Qt Widgets and I usually find that I have no control over the mobile device.For example how do I get control over the file system on android.This may sound trivial to some but it is my first trial of using Qt on android and most of the things I do are based on trial and error.
A pointer on where I should learn the good practices in that regard would be highly appreciated.
File system access on mobile platform are generally highly restricted, for that you should check the developer documentation for them.
Thanks for the Tip , will keep digging...