右侧信息弹窗使用PropertyAnimation来控制窗体的opacity透明度和Y坐标 就可以实现弹窗效果了
PropertyAnimation{
id: hideAnimation
target: subWindow
properties:"opacity"
from: 1.0
to: 0.0
duration: 300
onStopped: {
subWindow.visible = false;
}
}
PropertyAnimation{
id: downAnimation
target: subWindow
properties:"y"
from: root.y
to: root.y + 24
duration: 300
}
需要完整代码请访问QtQuickExamples