В 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