Important: Please read the Qt Code of Conduct -

Does QPrint assume page oriented printing?

  • I need to print a line at a time on a dot matrix printer. Print a line, next line, carriage return, wait for more, repeat. I looked at the docs for QPrint, but I cannot tell if it assumes page oriented printing. This is for a logging application.

  • Lifetime Qt Champion


    Might be a silly question but are you sure you shouldn't rather talk to that printer directly ?

    From you question it seems you'll be using it as a direct logging output so I am not sure QPrinter will fit your use case.

  • @SGaist said in Does QPrint assume page oriented printing?:

    shouldn't rather talk to that printer directly

    Yeah, I looked over the Qt Printer objects and it does seem to assume page oriented printing. I briefly thought about creating a QPrintEngine just for this printer, but the reuse of the code would not be very good. I talked to another dev and we came to the same conclusion that we should just send it directly. We have done this in the past. I think I found the network port needed to do this and will figure out what it needs. Maybe I will do a stream interface.

    Thanks for the feedback!

Log in to reply