Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Rotating camera on phone weird behavior
Qt 6.12 LTS is out! See what's new in the release blog

Rotating camera on phone weird behavior

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 334 Views
  • 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.
  • J Offline
    J Offline
    johnyboy
    wrote on last edited by johnyboy
    #1

    My code is as follows

    Camera {
    id: camera
    focus {
       focusMode: CameraFocus.FocusContinuous
       focusPointMode: CameraFocus.FocusPointAuto
     }
    }
    
    VideoOutput {
     source: camera
    }
    

    When I rotate the camera, it shows a 90 degree extra rotation, how to fix this?

    1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by Markkyboy
      #2

      QML is a declarative language, meaning you have to declare everything. Your code shows no mention of orientation, be it portrait or landscape, which with a rotational application like 'camera' needs to be defined. The device doesn't know otherwise.

      Perhaps there is the required info to be found in this post here;
      https://forum.qt.io/topic/76287/how-to-set-screen-orientation-on-specific-qml-how-to-rotate-all-specific-qml-elements-on-screen/8

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      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
      • Unsolved