I am having a problem compiling a program that draws a polygon on a QGraphicsScene.
The problem is the values supplied to QPoint. The error is 'no match for call to (QPoint)(double) (double)'.
I have changed the variable data type to float and even int! With the same error (NOT double, of course).
The hard coded values to the polygon line works.
I have attached the relevant code.
Any advice would be much appreciated.
[CODEvoid DataDisplay::drawData()
QPen outlinePen(Qt::black);
QPolygonF polygon;
double x,y;

QPoint p1,p2;
x = 10.4;
y = 20.5;

x = 120.2;
y = 30.2;
// polygon << QPointF((float)10.4, (float)20.5) << QPoint((float)120.2, (float)30.2);
polygon << p1 << p2;

QGraphicsScene *scene = new QGraphicsScene(this);

QBrush greenBrush(Qt::green);
QBrush blueBrush(Qt::blue);

scene->addPolygon(polygon, outlinePen);