Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Rotation for Scene and Mouse
Forum Update on Monday, May 27th 2025

QML Rotation for Scene and Mouse

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 4 Posters 2.1k 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.
  • michaelLM Offline
    michaelLM Offline
    michaelL
    wrote on last edited by
    #1

    Hi,

    according to this:

    QT_QPA_EGLFS_ROTATION - Specifies the rotation applied to software-rendered content in QWidget-based applications. Supported values are 180, 90, and -90. This does not apply to OpenGL-based windows, including Qt Quick. Qt Quick applications can apply transformations in their QML scene instead. The standard eglfs mouse cursor always takes the value into account, with appropriately positioned and rotated pointer image, regardless of the application type. The special cursor implementations, such as the KMS/DRM backend's hardware cursor, may not support rotation.

    I can rotate my QML Application and the Mouse would rotate its icon and invert its coordinate as well.
    But my rotation is not the proper one i think.
    Here is how i rotate each QML file:

    Item
    {

    id: base
    signal handlerLoader(string name)
    property int click:1
    width:1280
    height: 800
    
    property int rotation_dialog:0
    
    Rectangle
    {
        id: view
        color: "#000000"
        width: base.width
        height: base.height
    

    ........
    }

    Component.onCompleted:
    {
        if(Rotate.boolValue("Display 0°"))
        {
            view.rotation=0;
            view.width = base.width;
            view.height = base.height;
            rotation_dialog =0;
        }
        else
        {
            view.rotation = 180;
            view.width = base.width;
            view.height = base.height;
            rotation_dialog =180;
        }
    
    }
    

    }

    So what i am doing is rotating the rectangle. How do i proper rotate my QML application so that Mouse Cursor and its coordinates rotate as well?

    1 Reply Last reply
    0
    • michaelLM Offline
      michaelLM Offline
      michaelL
      wrote on last edited by
      #2

      Sorry my problem is that the mouse cursor and its coordinate dont rotate at all.
      So i want to proper rotat my QML Application so that the mouse cursor rotates too.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Steve172
        wrote on last edited by
        #3

        Might be running into this bug (fixed in Qt 5.8 supposedly): https://bugreports.qt.io/browse/QTBUG-39959

        1 Reply Last reply
        0
        • L Offline
          L Offline
          liteyear
          wrote on last edited by
          #4

          <grave dig>

          Did you ever find a solution for this? Even in Qt 6, this QT_QPA_EGLFS_ROTATION limitation remains documented. So what's the solution for QML?

          1 Reply Last reply
          2
          • L Offline
            L Offline
            Logan Grosz
            wrote on last edited by
            #5

            We've used Rotation, but doing that doesn't seem to rotate the popup context. It'd be great to have a solution that is external to the application.

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