Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QCameraImageCapture capturing images multiple times on Desktop but once on android--why is this?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
qcameraimagecap
5 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    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();
    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:

    '

    camera->searchAndLock();

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

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • musimbateM Offline
        musimbateM Offline
        musimbate
        wrote on last edited by
        #3

        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.

        Thanks.

        Why join the navy if you can be a pirate?-Steve Jobs

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          File system access on mobile platform are generally highly restricted, for that you should check the developer documentation for them.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • musimbateM Offline
            musimbateM Offline
            musimbate
            wrote on last edited by
            #5

            Thanks for the Tip , will keep digging...

            Why join the navy if you can be a pirate?-Steve Jobs

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved