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] QPainter, drawText and HTML
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QPainter, drawText and HTML

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

    Hi,

    I was wondering if QPainter::drawText was capable of marking up any HTML that was passed to it. My specific situation is that we have a custom-designed tooltip being drawn with QPainter and the non-breaking space characters we pass to the drawText function are not being marked up. Can anyone shed some light on this please?

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

      No, QPainter::drawText does not support HTML. You will need to use QTextDocument for that if limited HTML support is enough for you, or QWebPage if you need "all" of HTML.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        notgary
        wrote on last edited by
        #3

        Hi Andre,

        Thanks a lot. I''l do that.

        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