Link to home
Start Free TrialLog in
Avatar of obad62
obad62

asked on

QPainterPath

Hi there,
I wrote this code and I get this error, how can I solve it ?

I initialized paint_path like that :
 QPainterPath *paint_path;

this is the error message (no matching function for call to 'QGraphicsPathItem::setPath(QPainterPath*&)')

Thank you
void MainWindow::render_electrodes(double (*array)[3])
{
    paint_path = new QPainterPath();
    for(int i=2;i<2000;i++)
    {
        paint_path->lineTo(-(array[i][0]-21831),i);
    }
    path = new QGraphicsPathItem(0,scene);
    path->setPos(140,0);
    path->scale(0.3,1.0);
    path->rotate(-90);
    path->setPen(QPen(Qt::black));
    path->setPath(paint_path);
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial