I've found a performant solution to get all points from a line:
QLineF line(lastPoint,currentPoint);
for (int var = 0; var < line.length(); ++var) {
x=line.x1()+var*cos(line.angle());
y=line.y1()+var*sin(line.angle());
//qDebug()<<x<<" "<<y;
with this, i also get the points from a vertical line.
Greetings