PDA

View Full Version : How to draw a diagram in a QPrinter?



nifei
23rd February 2009, 05:53
Need i draw lines one by one via QPrinter? or Does QTextDocument or other class provide similar function?

wysota
23rd February 2009, 08:49
Use QGraphicsScene to make the diagram and print by calling QGraphicsScene::render().

nifei
23rd February 2009, 09:27
I found QTextCursor could insert table and QTextDocument could paint on this paint device. If it does not work, i 'll try your suggestion.

Thank you.

wysota
23rd February 2009, 10:05
Oh... so by "diagram" you meant "table"? :-)

aamer4yu
23rd February 2009, 15:38
QTextDocument::print and QTextDocument::drawContents might be helpful to you :)

nifei
24th February 2009, 03:41
QTextDocument::print and QTextDocument::drawContents might be helpful to you :)

Sorry for wrong expression