rasky at develer.com
Wed Sep 14 18:04:58 BST 2005
the documentation of QPointArray methods (eg. constructor) says:
QPointArray(int nPoints, const QCOORD *points);
This takes a single parameter which is a list of points.
This is a little confusing because it does not say how these "points" are
represented. I tried with QPoint, and it was wrong. I tried with
QCOORD(3,4), and then realized that QCOORD is just a typedef for "long" (and
does not exist in PyQt). Then I tried a list like [(0,4), (0,8)] and it
didn't work. Eventually, I tried a plain list of longs, and that worked. Of
course, now it seems like the obvious way to me (eg. the most similar to
what C++ does), but the documentation misguided me.
Maybe it could use some clarification.
More information about the PyQt