PDA

View Full Version : want to draw points in QGraphicsScene



ntp
10th April 2008, 02:02
I have a QGraphicsScene object where I would like to draw a series of points. I know that I can add a QPainterPath to draw more complex objects but I don't see how I can draw points. The only way that I can see is to draw them using QPainter::drawPoints but I don't really see a way to get that into the scene.

Is there a way to do this that I am missing?

Thanks,
ntp

jacek
10th April 2008, 18:02
You can draw small circles instead of points or you can create a custom item that represents a set of points.

aamer4yu
10th April 2008, 19:14
If ur points are constant, u can draw them in background or foreground

These might help you -

QGraphicsScene::drawForeground ( QPainter * painter, const QRectF & rect )
QGraphicsScene::drawBackground ( QPainter * painter, const QRectF & rect )
:)