Qt 6.11 is out! See what's new in the release
blog
Color animation
-
I have setup a
mouseAreafor thisItemdelegateand I want theRectangle(keyboardCardImageContainer) sibling of thedelegateto make a color transition whenever themouseArea'sonClickedsignal fires. How might I do that?delegate: Item { //Notify itemSelected that the user has made a decision MouseArea { height: keyboardCardIDContainer.height + keyboardCardImageContainer.height width: keyboardCardIDContainer.width onClicked: { //Here is where I want the animation to take place //I imagine it would be something like: //keyboardCardImageContainer.animation = true //or something along those lines? gridViewContainer.itemSelected(index) } } Rectangle { id: keyboardCardIDContainer width: 250 anchors.horizontalCenter: keyboardCardImageContainer.horizontalCenter height: keyboardCardID.height color: "#d7d7d7" TextStyled { id: keyboardCardID font.bold: true font.pixelSize: 18 anchors.centerIn: parent elide: Text.ElideMiddle text: gridView.imageList[index] } } Rectangle { id: keyboardCardImageContainer height: 250 width: 250 radius: 5 anchors.top: keyboardCardIDContainer.bottom color: "lightsteelblue" Image { id: keyboardCardImage anchors.centerIn: parent source: modelData } } } -
-