1
有一个用QML编写的实时通信工具,该消息以html格式传输。如何获得丰富文本中点击的图像?
simple code:
Rectangle{
width:300
height: 300
Rectangle{ // simple bubble
anchors.centerIn: parent
width: parent.width-100
height: parent.height-100
color:"#f0f0f0"
radius: 10
TextEdit { //simple message show
anchors.fill: parent
readOnly: true
selectByMouse: true
clip: true
text: "<!DOCTYPE html>
<html>
<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head>
<body style=\"font-family:Geneva,Helvetica,Arial,sans-serif; font-size: 12px;\">
this is an image:
<img alt=\"\" src=\"file:/local/image.png\" />
</body>
</html>
"
textFormat: Text.RichText
}
}
}
我的问题是如何从一个BubbleChatWidget获得点击的形象?
喜欢: click action
类似的问题:here
当我引用电报(网络),我发现,电报的消息不会有文字和图片一起。 link