Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

[Solved] How to preview html text in QML?



  • 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?


  • Moderators

    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.



  • Thank you! Got it to work :)


Log in to reply