Results 1 to 3 of 3

Thread: How can I put text on each page using QPrinter

  1. #1
    Join Date
    Jan 2007
    Posts
    13
    Qt products
    Qt4

    Default How can I put text on each page using QPrinter

    Hi all,

    I want to print something using QPrinter, and I want to put text (description, comment, ...) on each page. How can I do it?
    I have one solution: generate postscript file, devide it per pages, put text on each page and recombone all pages to one. But I don't think that it is good solution.
    How can I do it by using QPrinter?

    Please help me. I think that any replay can be useful.

    Thanks in advance.
    --davit

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How can I put text on each page using QPrinter

    Draw the text on each page using QPainter::drawText. QPrinter is a paint device just like QWidget, so you can open a QPainter on it and draw whatever you like.

  3. #3
    Join Date
    Jan 2007
    Posts
    13
    Qt products
    Qt4

    Default Re: How can I put text on each page using QPrinter

    Thanks wysota for suggestion. I will try to do that way.

    --davit

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Problem pasting text into a QTextEdit
    By Spockmeat in forum Qt Programming
    Replies: 8
    Last Post: 14th March 2009, 14:36
  3. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 15:30
  4. visible text of textedit
    By regix in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2006, 09:02
  5. Change the text color tab page
    By gtthang in forum Qt Programming
    Replies: 4
    Last Post: 18th February 2006, 17:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.