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. Printing compound widget as vector graphic postscript
Qt 6.11 is out! See what's new in the release blog

Printing compound widget as vector graphic postscript

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 3.7k 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.
  • J Offline
    J Offline
    jcbikeski
    wrote on last edited by
    #1

    I want to effectively do what QWidget->render does but I don't want it to first paint pixel graphics but rather directly paint vector graphics. Is there some flag or such or do I need to write my own recursive render routine? When I tried writing to PDF or postscript I found it painted first to a pixmap then the render routine inserted that raster/pixel image into the output. Since PDF and postscript can accept scalable vector graphics I hoped all my painter->drawXXXXX routines would result in vector graphics which would then scale well when my end users include these into other documents.

    Thanks for any ideas!

    John

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      But widgets and the styles they use are inherently raster based beasts (or at least many of the elements they use are). I am unsure of a way to get a completely vector-based format output that does not include rasterised elements.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        Afaik, Qt has no vector based paint engine. But you could write one and use that one instead of the pixel based (raster based) one.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          QGraphicsView, QGraphicsScene and QGraphicsViewItems could be used vector based. You can even use widgets in it, but those will remain raster based as ZapB mentioned.

          It uses QPrinter for output. You could check the pdf output possibilities first.

          Qt Certified Specialist
          www.edalsolutions.be

          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