Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QPainterPath will not add a null element

$
0
0
AFAIK it is undocumented that appending a null element, for example a lineTo(the current end point of the path), doesn’t actually add anything to a QPainterPath. path = QPainterPath(QPointF(0,0)) path.lineTo(QPointF(1,1)) previousCount = path.elementCount() path.lineTo(QPointF(1,1)) assert path.elementCount() > previousCount The assertion fails. I can understand the reason for it, but it did catch me by surprise.

Viewing all articles
Browse latest Browse all 18427

Trending Articles