Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59320

Calling QCameraInfo::availableCameras() returns empty list Windows 10/QCoreApplication

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10.1
    • 5.8.0
    • Multimedia
    • None
    • Windows 10 Professional, Qt 5.8.0 MinGW 32bit, QtCreator

    Description

      Create a console application with the code below. The output is always 0. The multimedia plugin function works fine with Qt Quick 2.0 on my GUI, but I'm wanting it to run in a service(console application) based on configurations provided by my GUI.

      #include <QCoreApplication>
      #include <QtMultimedia/QCameraInfo>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
          qInfo() << "Length is " << cameras.length();
      
          return 0;
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-59320
        # Subject Branch Project Status CR V

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            nvrnight James Hastings
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes