Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved unable to select BackFace camera on Surface Pro 4

    QML and Qt Quick
    2
    4
    631
    Loading More Posts
    • 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.
    • Sarah60
      Sarah60 last edited by

      Hi, I have a simple camera test app with a button to flip the camera from from the front facing camera to the back facing camera, but this does not work on a Surface Pro 4. It works on an iPhone 6. There are definitely 2 cameras available when I check QtMultimedia.availableCameras. Is this a known bug or is there something wrong with the following code? Thanks.

      Camera {
      id: camera
      captureMode: Camera.CaptureStillImage
      position: Camera.UnspecifiedPosition

          function flipCamera() {
              if (camera.cameraState !== Camera.ActiveState)
                  return;
              
              camera.position = (camera.position === Camera.FrontFace ? Camera.BackFace : Camera.FrontFace);
          }
      }
      
      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Are you using one of the Qt for Windows package or for WinRT ?

        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 Reply Quote 0
        • Sarah60
          Sarah60 last edited by

          Hi, it's for Window 10 Enterprise edition, running on a Surface Pro 4

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Then you will more likely have two items it in the list of available cameras.

            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 Reply Quote 0
            • First post
              Last post