Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TextEdit and displaying of images inside of it
QtWS25 Last Chance

TextEdit and displaying of images inside of it

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 503 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FOXLISIN
    wrote on last edited by FOXLISIN
    #1

    Hi friends! I'm trying to display images inside of TextEdit like this:

    TextEdit {
            id: text;
    
            anchors{
                left: parent.left;
                right: parent.right;
                bottom: parent.bottom;
            }
    
            textFormat: TextEdit.RichText;
    
            text: "<img width=\"20\" height=\"20\" src=\"http://vk.com/images/emoji/D83DDE0E.png\">";
            wrapMode: Text.WordWrap;
        }
    

    and it works good except of "Copy/Paste" functionality. i.e. when i copy a content of TextEdit and paste it outside of my application - only text is copied. And i want to bind image to some text. Is it possible to implement it?

    T 1 Reply Last reply
    1
    • F FOXLISIN

      Hi friends! I'm trying to display images inside of TextEdit like this:

      TextEdit {
              id: text;
      
              anchors{
                  left: parent.left;
                  right: parent.right;
                  bottom: parent.bottom;
              }
      
              textFormat: TextEdit.RichText;
      
              text: "<img width=\"20\" height=\"20\" src=\"http://vk.com/images/emoji/D83DDE0E.png\">";
              wrapMode: Text.WordWrap;
          }
      

      and it works good except of "Copy/Paste" functionality. i.e. when i copy a content of TextEdit and paste it outside of my application - only text is copied. And i want to bind image to some text. Is it possible to implement it?

      T Offline
      T Offline
      tarod.net
      wrote on last edited by
      #2

      @FOXLISIN Hi!

      It works. If you paste the content in Word using paste special and you choose "HTML format", you should see the image.

      "Individually, we are one drop. Together, we are an ocean."

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved