Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How to preview html text in QML?
Forum Updated to NodeBB v4.3 + New Features

[Solved] How to preview html text in QML?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 754 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.
  • S Offline
    S Offline
    skammers
    wrote on last edited by
    #1

    Hi!

    I got a text document including some lines written in html.
    I have a check button for where the user can choose to either see the html code version of the text or
    the html preview of the text. But I wonder how I, in QML, can make html text previews?

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Create a C++ function which will open and parse your HTML file and assign the parsed text to a QString and then send this QString to a TextArea's text which will actually display the contents.

      157

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skammers
        wrote on last edited by
        #3

        Thank you! Got it to work :)

        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