March 17, 2011

xeroblast xeroblast
Lab Rat
91 posts

[SOLVED] QPrinter help

 

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.

3 replies

March 17, 2011

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

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

March 17, 2011

Andre Andre
Robot Herder
6295 posts

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.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

March 17, 2011

xeroblast xeroblast
Lab Rat
91 posts

thanx… Font Sampler will do…

 
  ‹‹ Preventing flicker of moving images      Compilation Issue with QWS example ››

You must log in to post a reply. Not a member yet? Register here!