Nominate our 2022 Qt Champions!

QCameraImageCapture capturing images multiple times on Desktop but once on android--why is this?

  • Hello,
    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();
    imageCapture=new QCameraImageCapture(camera);


    and capturing the image and saving on my drive as follows:



    //on shutter button pressed
    //on shutter button released


    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.

  • Lifetime Qt Champion


    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.


  • Lifetime Qt Champion

    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...

Log in to reply