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. QML TextEdit with RichText problem mixing text and image tag
Qt 6.11 is out! See what's new in the release blog

QML TextEdit with RichText problem mixing text and image tag

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 2.4k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    AlterX
    wrote on last edited by
    #1

    Hello,
    I'm triyng to use a TextEdit component mixing text and html tags such as <img> using TextEdit.RichText
    The latter property causes to create all html stuff when using text property of TextEdit (e.g. <!DOCTYPE ...bla bla)...
    When I write a simple word WITHOUT put a space after that, the text property doesn't consider that text as part of html and so I see html like this (retrieving it using text property):
    @
    <!DOCTYPE>
    ...
    ...
    <body></body>
    @

    If I put a space immediately after word, I see this html:
    @
    <!DOCTYPE>
    ...
    ...
    <body>simpleword </body>
    @

    This causes a problem when I put img tag AFTER a word without space, it create html like this:
    @
    <!DOCTYPE>
    ...
    ...
    <body><img src=':/image/file.png'/> simpleword</body>
    @

    That is not I have really put in TextEdit!

    This behaviour is shown on harmattan, but I think it's the same on all platform.
    Someone with a valid solution?

    Qt Ambassador
    Real-time cooperative teams: http://www.softairrealfight.net
    Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

    https://codereview.qt-project.org/...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AlterX
      wrote on last edited by
      #2

      No one knows a solution?!

      Qt Ambassador
      Real-time cooperative teams: http://www.softairrealfight.net
      Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

      https://codereview.qt-project.org/...

      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