0

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 ?

Armand
  • 726
  • 11
  • 29
  • 1
    http://stackoverflow.com/questions/9777936/why-do-my-my-line-widths-looks-different-in-a-qgraphicsscene-with-the-same-qpen – synacker Jun 14 '15 at 12:37

1 Answers1

0

Problem solved with :

goView->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
Armand
  • 726
  • 11
  • 29