[PyKDE] argument parse error with sip-snapshot-200602116 ?

Phil Thompson phil at riverbankcomputing.co.uk
Fri Feb 17 11:00:36 GMT 2006


On Friday 17 February 2006 6:00 am, Gerard Vermeulen wrote:
> Hi Phil,
>
> There is a problem with argument parsing in QPainter.drawText.
>
> This snippet:
>
>             print type(0)
>             print type(r.top())
>             print type(r.width())
>             print type(painter.fontMetrics().height())
>             print type(QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter)
>             painter.drawText(
>                 0, r.top(), r.width(), painter.fontMetrics().height(),
>                 QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter, title)
>
> print this:
>
> <type 'int'>
> <type 'int'>
> <type 'int'>
> <type 'int'>
> <class 'PyQt4.QtCore.Alignment'>
> Traceback (most recent call last):
>   File "./CurveDemo1.py", line 102, in paintEvent
>     self.drawContents(painter)
>   File "./CurveDemo1.py", line 134, in drawContents
>     QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter, title)
> TypeError: argument 3 of QPainter.drawText() has an invalid type

Should be fixed in tonight's SIP snapshot.

Thanks,
Phil




More information about the PyQt mailing list