QPainterPath::elementAt()
returns an object of type QPainterPath::Element, not a QPoint
(it has a QPointF operator defined).
You can use code like this:
const QPainterPath::Element &elem = path.elementAt(ii);
// You can use the type enum.
qDebug() << elem.type;
// Or you can use the functions.
if (elem.isCurveTo()) {
qDebug() << "curve";
} else if (elem.isLineTo()) {
qDebug() << "line";
} else if (elem.isMoveTo()) {
qDebug() << "move";
}