Hi, I'm creating a QTextDocument and print it as PDF to a QPrinter with QTextDocument::print (). I can create text and tables, but I would like to insert a simple horizontal line to separate some paragraphs.
I tried to create an empty frame like this:
but it did not shown up in my printed PDF.Qt Code:
QTextFrameFormat oLineFormat; oLineFormat.setHeight (1); oLineFormat.setWidth (100); oDocumentCursor.insertFrame (oLineFormat); oDocumentCursor.insertText (" ");To copy to clipboard, switch view to plain text mode
I read the text object example, but do I really have to create my own TextObject for this? Or is there a simpler way to draw a line?
Ginsengelf
Bookmarks