Sample code of what you're trying to do would help alot here.
QPainter use:
Construct your QPainter object pointing at a canvas object, and then call painter_obj.drawPoint(x,y);
. Note that the QPainter needs to be created on the stack, not the heap, so that the destructor of the object can kick off the actual drawing.
The example from the docs:
void SimpleExampleWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setPen(Qt::blue);
painter.setFont(QFont("Arial", 30));
painter.drawText(rect(), Qt::AlignCenter, "Qt");
}
QGraphicsScene use:
Usually, you use a QGraphicsScene to manage a large number of objects floating around a view at the same time. This is overkill for a simple drawing widget. QGraphicsScene is not, iirc, a valid canvas for a QPainter to paint on.
Instead, you create a QGraphicsItem (or subclass) of the appropriate type, and override the paint method. When your QGrpahicsItem is added to the Scene, the library will pass you a QPainter object to use to handle your drawing when appropriate.