How to Give shadow to an Animated image?
Unsolved
QML and Qt Quick
-
Hi geeks..
I am trying to give a shadow effect in a png image which is in an animation loop , So I cant able to produce dropshadow effect for that image . kindly help me in thisimport QtQuick 2.9 import QtQuick.Window 2.2 import QtQml 2.12 import QtGraphicalEffects 1.12 Item { id:item width:350 height: 230 Image{ id: img source: "qrc:/assets/image.png" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: item.verticalCenter transformOrigin: Item.Center SequentialAnimation { id: sq running:true loops: 2 ScaleAnimator{ id: scaleanim_up target: img from: 0.15 to: 0.18 duration: 120; } ScaleAnimator{ id: scaleanim_down target: img from: 0.18 to: 0.15 duration: 120; } } Timer{ id:timer interval: 1000 repeat: true running: true triggeredOnStart: false onTriggered: { sq.start(); } } } DropShadow { anchors.fill: img transparentBorder: true horizontalOffset: 8 verticalOffset: 8 color:"#000000"; source: img } }
but I am facing issues in this like if I give a drop shadow to the image the animation stops so how to get both shadow and animation in a qml code