Wider line in QGraphicScene on MainWindow::resizeEvent

26 views Asked by At

In a window I've got a QGraphicScene. Inside this QGraphicScene I draw some lines (see the first picture).

enter image description here

My bug is that when I resize the window the code below is called to fit the scene in the view.

void GoBobMainWindow::resizeEvent(QResizeEvent *event)
{
    goView->fitInView(goScene->sceneRect(), Qt::KeepAspectRatio);
    QMainWindow::resizeEvent(event);
}

But I get this.

enter image description here

EDIT: I get this on all platforms (OS X, Windows, GNU/Linux)

How do fix this ?

1

There are 1 answers

0
Armand On

Problem solved with :

goView->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);