bingofuel
24th August 2009, 02:30
Hello.
I'm using QT 4.5 on GNU/Linux.
I'm trying to make a 2d plot Widget using QGraphicsView. I've done a few things in reference to this, always with a non-modificable QGraphicsItem, and everything goes well (it's really an excellet framework)
But when i tried to make an real-time incremental plotter i get lost, because i don't know how to modify the content of the QGraphicsItem in a correct way, I mean, that the GraphicsItem update at acceptable time.
I tried modifying the QPainterPath of the QGraphicsItem when a new point arrived, adding the point at the end.
QPainterPath painterpath= item.path();
painterpath.lineTo(newpoint);
item.setPath(painterpath);
but that is really expensive, and i suppouse a bad way to do it.
i took a look at QGraphicsItemAnimation but i couldn't see the way to do it, either.
i've already seen the qwt project but i think it hasn't a QGraphicsView implementation.
There are examples of something like that? How can i do it?
thanks!
I'm using QT 4.5 on GNU/Linux.
I'm trying to make a 2d plot Widget using QGraphicsView. I've done a few things in reference to this, always with a non-modificable QGraphicsItem, and everything goes well (it's really an excellet framework)
But when i tried to make an real-time incremental plotter i get lost, because i don't know how to modify the content of the QGraphicsItem in a correct way, I mean, that the GraphicsItem update at acceptable time.
I tried modifying the QPainterPath of the QGraphicsItem when a new point arrived, adding the point at the end.
QPainterPath painterpath= item.path();
painterpath.lineTo(newpoint);
item.setPath(painterpath);
but that is really expensive, and i suppouse a bad way to do it.
i took a look at QGraphicsItemAnimation but i couldn't see the way to do it, either.
i've already seen the qwt project but i think it hasn't a QGraphicsView implementation.
There are examples of something like that? How can i do it?
thanks!