90%の不透明度の灰色の四角形があり、アニメーションを使ってこの不透明度を変更しようとしています。 OpacityAnimatorを使用しようとしましたが、ドキュメンテーションによると、Item :: opacityの値は、アニメーションが終了した後に更新されます。QMLで不透明アニメーションを作成する
これは私が期待していたものではありません。アニメーション中の不透明度を2秒後に即座に90から0に変更するのではなく、減らしたいと考えています。私が持っているものだ
:
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("title")
Rectangle{
width: parent.width
height: parent.height
opacity: 90
color: "gray"
id: recLoading
Text {
id: txtLoading
text: qsTr("Loading")
font.bold: true
}
OpacityAnimator on opacity{
from: 90
to:0
duration:2000
target: parent
running:true
}
}
}
ああ、私は0と100の間であると思った!今それは働いている!ありがとう –