I am trying to draw basic shapes on a QGLWidget. I am trying to enable antialiasing to smooth out the lines, but it is not working.
This is what I am trying at the moment:
QGLWidget *widget = ui->renderWidget;
QPainter painter;
widget->makeCurrent();
glEnable(GL_MULTISAMPLE);
glEnable(GL_LINE_SMOOTH);
painter.setRenderHint(QPainter::Antialiasing);
painter.setRenderHint(QPainter::HighQualityAntialiasing);
painter.begin(widget);
However, anything drawn with this painter still has jagged edges. What else do I need to do?