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. QPainterPath from QGraphicsTextItem
Qt 6.11 is out! See what's new in the release blog

QPainterPath from QGraphicsTextItem

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

    Hello,

    Is there any possibility to get a QPainterPath from a QGraphicsTextItem with rich text ?

    When rendering QGraphicsScene(including QGraphicsTextItem) to a PDF Document all the Text in the Document are vectors.
    So it should be possible.

    Do you have any idea how i can archive this ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msue
      wrote on last edited by
      #2

      There is something more general for fonts:
      @QPainterPath myPath;
      myPath.addText(baseline, myFont, tr("Qt"));@

      1 Reply Last reply
      0
      • E Offline
        E Offline
        euchkatzl
        wrote on last edited by
        #3

        I know this.

        But with Rich text there can be many different fonts even in one line.

        Is there any possibility to get this information and then use the code above ?

        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