p1(10.4,20.5);
p1(10.4,20.5);
To copy to clipboard, switch view to plain text mode
This is the line that causes the compilation error. The error message is telling you that the QPoint (and QPointF) class has no method with the signature:
void QPoint::operator()( double arg1,
double arg2
);
void QPoint::operator()( double arg1, double arg2 );
To copy to clipboard, switch view to plain text mode
which is what your expression translates to. I think you are confusing this with a constructor. You could simply replace this line with this assignment (after changing p1 to QPointF):
p1 = QPointF( x1, y1 );
To copy to clipboard, switch view to plain text mode
Bookmarks