QML Rotation for Scene and Mouse
-
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?
-
Might be running into this bug (fixed in Qt 5.8 supposedly): https://bugreports.qt.io/browse/QTBUG-39959
-
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.