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. QCamera status not changing
Forum Updated to NodeBB v4.3 + New Features

QCamera status not changing

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 558 Views 1 Watching
  • 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.
  • A Offline
    A Offline
    ashokb
    wrote on last edited by
    #1

    Hello,
    I am trying to capture some images from my qt application.
    I have code as shown,
    @
    QList<QByteArray> device = QCamera::availableDevices();

    myCamera = new QCamera(device.at(0));
    myCamera->setParent(this);
    connect(myCamera, SIGNAL(stateChanged(QCamera::State)), this, SLOT(updateCameraState(QCamera::State)));
    connect(myCamera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(updateCameraStatus(QCamera::Status)));
    
    imgCapture = new QCameraImageCapture(myCamera);
    imgCapture->setCaptureDestination(QCameraImageCapture::CaptureToFile);
    
    myCamera->setViewfinder(ui->viewFinder);
    myCamera->setCaptureMode(QCamera::CaptureStillImage);
    myCamera->start();
    
    this->setWindowTitle("Camera");
    myCamera->searchAndLock();
    

    @
    then i check for
    @imgCapture->isAvailable()@

    it shows "true" and also camera state returns Active state.
    But when i check camera status it is always
    @QCamera::UnavailableStatus@
    and hence it's not taking images for me with
    @imgCapture->capture("abc.jpg")@
    Anybody have any idea whats missing?
    I am using Logitech Webcam c525.

    [edit : fixed typo in title, Eddy ]

    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