tugba
tugba

Reputation: 31

QGraphicsPathItem antialiazing problem

I use QGraphicsPathItem when draw line on scene. But lines on the scene not exactly straight.Line is knurled.

I searched but there isnt QGraphicsPathItem anitialising property. Do you have any suggestion about this?

Upvotes: 1

Views: 885

Answers (1)

Palmik
Palmik

Reputation: 2665

You would use QGraphicsView::setRenderHint(QPainter::RenderHint) on your view with QPainter::Antialiasing flag as an argument.

For example:

myView->setRenderHint(QPainter::Antialiasing);

If you are not satisfied with the results, then you can try this: setViewport(QWidget*)to QGLWidget and turn on the QPainter::HighQualityAntialiasing render hint.

myView->setViewport(new QGLWidget);
myView->setRenderHint(QPainter::HighQualityAntialiasing);

Upvotes: 3

Related Questions