QML show Text and gif in QML Text Element like weibo
-
I meet a serious question when i use text with html like this:
@
Rectangle {
width: 100
height: 62
Text {
id: name
text: "Qt Project is very useful....<img /> I like it very much"
anchors.centerIn: parent
}@but result it like this: gif file can't show animation,but png file can show it normal so i need help to show it normal,anybody can know how to do,help please,thx
-
Did you solve your problem? Could you please share your solutions for this?
-
@cuongkjm You could simply make a Row and use the AnimatedImage in the center:
Row { spacing: 5 Text{ id: text anchors.verticalCenter: parent.verticalCenter text: "Qt Project is very useful" } AnimatedImage { anchors.verticalCenter: parent.verticalCenter height: text.height * 2.5 fillMode: Image.PreserveAspectFit source: "https://doc.qt.io/qt-5/images/pathview.gif" } Text{ anchors.verticalCenter: parent.verticalCenter text: "I like it very much" } }