The image is cropped diagonally
-
Hello!
I'm developing an Android application.
When deploying an application to an emulator, an element of type "Image" (or "VideoOutput") is cropped diagonally.

But on a real smartphone everything is fine.
The Qt version is 6.10.1.
Has anyone come across this?
Thanks in advance! -
Here is my code snippet:
... Button { id: customButton contentItem: ColumnLayout { spacing: 10 Image { width: 130; height: 100 fillMode: Image.PreserveAspectFit source: "qrc:/images/profile.png" Layout.alignment: Qt.AlignHCenter } Label { id: textLabel text: "Go to your account" Layout.alignment: Qt.AlignHCenter font: customButton.font } } onClicked: { stackView.push(detailPage) } } ....
-
Here is a simple code:
ApplicationWindow { id: mainwindow width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { width: 130; height: 100 color: "#4dcc51" border.color: "black" anchors.centerIn: parent } }.
This is what the emulator displays:

. -
Here is a simple code:
ApplicationWindow { id: mainwindow width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { width: 130; height: 100 color: "#4dcc51" border.color: "black" anchors.centerIn: parent } }.
This is what the emulator displays:

.@woodpecker Interesting. I wonder if it's related to https://qt-project.atlassian.net/browse/QTBUG-134245 (although that's meant to be fixed in Qt 6.10.0)
Does it help if you set the environment variable,
QT_DISABLE_SHADER_DISK_CACHE=1? -
Here is a simple code:
ApplicationWindow { id: mainwindow width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { width: 130; height: 100 color: "#4dcc51" border.color: "black" anchors.centerIn: parent } }.
This is what the emulator displays:

.@JKSH said in The image is cropped diagonally:
Does it help if you set the environment variable, QT_DISABLE_SHADER_DISK_CACHE=1 ?
I added the following line as the first line in the main function:
qputenv("QT_DISABLE_SHADER_DISK_CACHE", "1");
but it didn't help.