[PyQt] Bug report (scribble example)

Håkon Bertheussen haakon at bertheussen.com
Wed May 21 16:25:58 BST 2008


The behavior of the scribble example (in examples/widgets/scribble.pyw) 
differs somewhat from the Qt version. When drawing there will sometimes 
be gaps in the scribbles even if the mouse button is pressed the whole 
time. This is due to a bug in the calculation of the update rectangle in 
drawLineTo(). The fix is to change line 114 from:

rad = self.myPenWidth / 2

to:

rad = self.myPenWidth / 2 + 2
(this is how the Qt version does the calculation)

I realize that this is a pretty insignificant "bug", but I thought I'd 
let you know anyway. Before I spotted the error I was a bit worried that 
there might be a bug with PyQt itself.


More information about the PyQt mailing list