title: How to set image resolution with QCamera in Qt 5.3?
body: <p>I am working on Qt <code>Qcamera</code> to capture images, on Windows Surface Pro tablet. I have written this small piece of code to check the QCamera functionaliy, but after capturing the image, the image saved has very low resolution i.e. 640*360, even  though the rear camera of surface pro supports 1280*720. Even the QList for supported resolution always returns empty. I looked everywhere but couldn't find a possible solution, can anyone please help? </p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>#include "camera.h"
  #include &lt;QCamera&gt;
  #include &lt;QCameraImageCapture&gt;
  #include &lt;QCameraViewfinder&gt;
  #include &lt;QDebug&gt;
  #include&lt;QMultimedia&gt;
  
  Camera::Camera(QWidget *parent) :
      QWidget(parent)
  {
  
      QByteArray cameraDevice;
      int count = QCamera::availableDevices().count();
  
      int cameraId = 1;
  
  
      QList&lt;QByteArray&gt; cameradev = QCamera::availableDevices();
      QByteArray camdevice = cameradev[cameraId];
  
      QCamera *camera = new QCamera(camdevice);
  
      QString description = camera-&gt;deviceDescription(camdevice);
      qDebug() &lt;&lt;"Device Name"&lt;&lt; description;
  
      QCameraViewfinder *viewfinder = new QCameraViewfinder();
      viewfinder-&gt;showMaximized();
      camera-&gt;setViewfinder(viewfinder);
      QCameraImageCapture *imageCapture = new QCameraImageCapture(camera);
      //camera-&gt;setCaptureMode(QCamera::CaptureStillImage);
      camera-&gt;start();
      QList&lt;QSize&gt; resolutions = imageCapture-&gt;supportedResolutions();//returns       always empty
      QImageEncoderSettings imageSettings;
      imageSettings.setCodec("image/jpeg");
      imageSettings.setResolution(1280, 720);
      imageCapture-&gt;setEncodingSettings(imageSettings);
      imageCapture-&gt;capture("D:/1.jpg");
      camera-&gt;searchAndLock();
      camera-&gt;unlock();
      qDebug() &lt;&lt; camera-&gt;error();    
  }
  </code></pre>