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. html in qt widget?
Forum Updated to NodeBB v4.3 + New Features

html in qt widget?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 99 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.
  • 1 Offline
    1 Offline
    1XU7
    wrote 21 days ago last edited by
    #1

    Hi..

    It is possible to insert any html code inside a Qt Widget application?,
    for instance, i have a contact form's html block code, and i was wondering if there is some sort of way to embed it..

    thanks

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote 21 days ago last edited by Bonnie
      #2

      QTextDocument supports HTML4 markup, you can read this:
      https://doc.qt.io/qt-6/richtext-html-subset.html
      The simplest way to show html content in Qt Widget would be using QLabel's setText or QTextEdit's setHtml method.
      If the html code is more complicated than just rich text, or you need some html features that QTextDocument doesn't support, then you can use QWebEngineView in Qt WebEngine module.

      1 Reply Last reply
      4

      1/2

      16 May 2025, 01:42

      • Login

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