I have a QML application where in I have two windows. I have an image with continuous animation on each window. The expected result is to have two windows with an image rotating 360 degree continuously. The result is as expected on Desktop. But on IMX8, I am able to see two windows with an image without rotation animation. My code is as shown below:
main.qml
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
id: root
width: 640
height: 480
visible: true
title: qsTr("Hello World")
AnimationWindow {}
Window{
id: child
width: root.width/2
height: root.height/2
visible: true
AnimationWindow{}
}
}
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
id: root
width: 640
height: 480
visible: true
title: qsTr("Hello World")
AnimationWindow {}
Window{
id: child
width: root.width/2
height: root.height/2
visible: true
AnimationWindow{}
}
}
To copy to clipboard, switch view to plain text mode
AnimationWindow.qml
import QtQuick 2.0
Item {
property bool running: false
Rectangle {
height: root.height
width: root.width
anchors.centerIn: root
Image {
id: bg
source: "qrc:/Images/FaultAndWarningStop.png"
height: parent.height
width: parent.width
fillMode: Image.PreserveAspectFit
RotationAnimation on rotation{
from: 0
to: 360
duration: 3000
running: root.running
loops: Animation.Infinite
}
}
MouseArea{
anchors.fill: bg
onClicked: root.running = true
}
}
}
import QtQuick 2.0
Item {
property bool running: false
Rectangle {
height: root.height
width: root.width
anchors.centerIn: root
Image {
id: bg
source: "qrc:/Images/FaultAndWarningStop.png"
height: parent.height
width: parent.width
fillMode: Image.PreserveAspectFit
RotationAnimation on rotation{
from: 0
to: 360
duration: 3000
running: root.running
loops: Animation.Infinite
}
}
MouseArea{
anchors.fill: bg
onClicked: root.running = true
}
}
}
To copy to clipboard, switch view to plain text mode
The output seen on IMX8 is just 2 static images on each window rather than with rotation. Is there any issue with QQuickWindow continuously updating on IMX8?
Thanks in advance!
Bookmarks