Qt & printing

Richard Moore rich at ipso-facto.freeserve.co.uk
Tue Oct 19 16:26:16 BST 1999



Peeter Russak wrote:
> 
> Hi!
> 
> It's not actually a kdevelop-related question, but your are the guys, who
> actually use Qt every day and so know most of it's bugs.
> Is it a known bug, that printing with QPrinter into PostScript printer gives
> always a broken pipe error? Tried with Qt 2.0.1, 2.0.2 and 2.1.0-19991009. All
> ended in Broken pipe. Printing into file does the right thing.
> BTW Qt-s drawdemo example crashes the same way as my program. I'm using RedHat
> 6.1. If answer is positive, then does anybody know workaround for this problem?

I've never seen this problem from Qt before, but a workaround would be
to catch the SIGPIPE. What exactly are you doing? Are you writing directly
to the parallel port your printer is connected to? If so, then try piping
your output to lpr instead (this is better anyway).

Rich.

> 
> Last things strace tells me are:
> write(6, "\n%%Pages: ", 10)             = 10
> write(6, "1", 1)                        = 1
> write(6, "\n%%DocumentFonts: ", 18)     = 18
> write(6, "\n%%EndComments\n\n", 16)     = 16
> brk(0x80c5000)                          = 0x80c5000
> --- SIGCHLD (Child exited) ---
> brk(0x80c7000)                          = 0x80c7000
> brk(0x80c9000)                          = 0x80c9000
> brk(0x80ce000)                          = 0x80ce000
> brk(0x80d0000)                          = 0x80d0000
> brk(0x80d3000)                          = 0x80d3000
> write(6, "% Optimized Qt prolog\n", 22) = -1 EPIPE (Broken pipe)
> --- SIGPIPE (Broken pipe) ---
> +++ killed by SIGPIPE +++
> 
> --
> Peeter

-- 
     Richard Moore		rich at ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard at robocast.com
http://developer.kde.org/	rich at kde.org




More information about the KDevelop mailing list