2017-02-16 8 views
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

答えて

関連する問題