[PyQt] QPainter bug(?) in printing.pyw example from PyQt book

Denis Konchekov dkonchekov at gmail.com
Thu Jan 8 18:06:27 GMT 2009


System: Ubuntu 8.10, Python 2.5.2, PyQt 4.4.3
Book "Rapid GUI Programming with Python and Qt", example from chap13
Faded cells in first table after printing to pdf (before changing pen
color).
See screenshot in attachment or here:
http://img404.imageshack.us/done.php?l=img404/1899/75073848lv9.jpg
Everything ok after adding yet another painter.setPen(Qt.color):

<...>
y += serifLineHeight
if balance < 0:
    painter.setPen(Qt.red)
    text = "Please remit the amount owing immediately."
else:
    text = ("We are delighted to have done business "
                        "with you.")
painter.drawText(x, y, text)
painter.setPen(Qt.red)             #added
painter.setPen(Qt.black)
y += int(serifLineHeight * 1.5)
painter.drawText(x, y, "Transactions:")
y += serifLineHeight
option = QTextOption(Qt.AlignRight|Qt.AlignVCenter)
for date, amount in statement.transactions:
<...>

mysticism?

Denis



> Message: 2
> Date: Thu, 8 Jan 2009 20:59:35 +0300
> From: "Denis Konchekov" <dkonchekov at gmail.com>
> Subject: [PyQt] QPainter bug(?) in printing.pyw example from PyQt book
> To: pyqt at riverbankcomputing.com
> Message-ID:
>        <90250b090901080959m43f4f1c6l92a945b22f67f91a at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Skipped content of type multipart/alternative-------------- next part
> --------------
> A non-text attachment was scrubbed...
> Name: 1.jpg
> Type: image/jpeg
> Size: 33943 bytes
> Desc: not available
> Url :
> http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090108/ca38076d/1.jpg
>
> ------------------------------
>
> _______________________________________________
> PyQt mailing list
> PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> End of PyQt Digest, Vol 54, Issue 10
> ************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090108/4a99d1f4/attachment.html


More information about the PyQt mailing list