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. How douse QPainter, QPaintDevice and QPaintEngine work
Qt 6.11 is out! See what's new in the release blog

How douse QPainter, QPaintDevice and QPaintEngine work

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 798 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.
  • T Offline
    T Offline
    TobiasFalk42
    wrote on last edited by
    #1

    I tried to find out how the QPaintDevie works and where the actual file is created, for example where it writes the SVG tags and so. After a while, I saw that it had something to do with QPaintEngine, but I wasn't really able to figure out how it works. I even tried to find the "<line " tag in the SVG class, but this was nowhere to be seen, which kind of confused me.

    As for why I wanted to know how it works, I wanted to know how hard it would be to implement a new Paint device, for example a Latex TikZ one.

    jsulmJ 1 Reply Last reply
    0
    • T TobiasFalk42

      I tried to find out how the QPaintDevie works and where the actual file is created, for example where it writes the SVG tags and so. After a while, I saw that it had something to do with QPaintEngine, but I wasn't really able to figure out how it works. I even tried to find the "<line " tag in the SVG class, but this was nowhere to be seen, which kind of confused me.

      As for why I wanted to know how it works, I wanted to know how hard it would be to implement a new Paint device, for example a Latex TikZ one.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @TobiasFalk42 If you want to create a SVG image then take a look at this example: https://doc.qt.io/qt-6/qtsvg-svggenerator-example.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TobiasFalk42
        wrote on last edited by
        #3

        I do not want to create a SVG image I want to export my QPaint as Latex TikZ(link text image/diagram.
        To do that I was thinking to create a QPaintDevice simelar to the SVG one but I am not abke to understand how the QPaintDevice and all works internaly.

        1 Reply Last reply
        0
        • jeremy_kJ Offline
          jeremy_kJ Offline
          jeremy_k
          wrote on last edited by
          #4

          The paint system documentation might be what you're looking for.

          Asking a question about code? http://eel.is/iso-c++/testcase/

          1 Reply Last reply
          1
          • T Offline
            T Offline
            TobiasFalk42
            wrote on last edited by
            #5

            @jeremy_k, yes, this helped a lot. I also saw that the SVG does not use the <line tag, but the <path tag for drawing a line.

            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