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] QPrinter help
QtWS25 Last Chance

[SOLVED] QPrinter help

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

    can you show me how to print directly to a printer? just a simple data and print.

    i have no idea how to go using the QPrinter.

    thanx.

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      ready code available in Qt Sdk -> Demo -> Paint -> Font Sampler

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

        First of all, printing is not trivial, especially deviding your content over multiple pages in a sane way is not aways easy. QPrinter is a QPaintDevice subclass. You can use all of QPainter's methods to paint on it. One simple way of printing some stuff, is to combine that with QTextDocument. That class features a print() method that takes care of most of the dirty stuff (including paginating) for you.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xeroblast
          wrote on last edited by
          #4

          thanx... Font Sampler will do...

          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