Hello,

I'd like to write a library that uses Qt's capabilites to control cameras. The lib is to be used in both console and gui applications. However, a QApplication object seems to be necessary for QCameraInfo to work properly. Why is this the case? Is it possible to use QCameraInfo and QCamera without a graphical user interace? Consider the following example. If no QApplication is constructed, QCameraInfo::availableCameras() always returns an empty list:

Qt Code:
  1. #include <iostream>
  2. #include <QtMultimedia/QCamera>
  3. #include <QtMultimedia/QCameraInfo>
  4. #include <QApplication>
  5.  
  6. using namespace std;
  7.  
  8. int main(int argn, char** argv)
  9. {
  10. QApplication app(argn, argv);
  11. QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
  12. cout << cameras.size() << endl;
  13.  
  14. return 0;
  15. }
To copy to clipboard, switch view to plain text mode 

I'm using windows 10 and Qt 5.5.1. Thank you for your help!