[PyKDE] QPointArray problem

Ismail Donmez ismail at pardus.org.tr
Tue Apr 4 11:41:05 BST 2006


According to Qt3 docs I can do something like this :

QPointArray a( 1 );
a[0] = QPoint( 4, 5 );

but doing the same with PyQt3 :

>>> a = QPointArray(1)
>>> a[0] = QPoint(4,5)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: object does not support item assignment

Another related problem is with point() :

>>> a = QPointArray(1)
>>> a.setPoint(0,QPoint(1,1))
>>> type(a.point(0))
<type 'tuple'>

But the Qt3 documentation says point(index) should return a QPoint. This is 
important because currently you can't do something like :

a = QPointArray(1)
b = QPointArray(1)


Solution would be either making point(index) return a QPoint or making 
setPoint accept a tuple for second argument.


<Terwou> \\o \o> <o/ o//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060404/3907b111/attachment.bin

More information about the PyQt mailing list