0

I have used QPixmapItem to display the images in a QGraphicsview viewport. I'm loading thousands of pixmaps at a time. So I decided to set some options to cache the pixmaps I'm loading for the images. Here's what I've done:

View->scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
    View->setRenderHint(QPainter::Antialiasing, false);

    QGLFormat fmt;
    fmt.setSampleBuffers(true);
    fmt.setSamples(2);
    //View->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
     View->setViewport(new QGLWidget(fmt));

    View->setOptimizationFlags(QGraphicsView::DontSavePainterState | QGraphicsView::DontAdjustForAntialiasing);
    View->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
 View->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);

    View->setCacheMode(QGraphicsView::CacheBackground);

If I don't use QGLWidget and OpenGL as viewport of QGraphicsVIew the pixmaps are looking normal, but if I use OpenGL viewport, the rendered pixmaps are looking "blurred". The "blurred" case is on the left, normal on the right.

enter image description here enter image description here

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
Wagmare
  • 1,354
  • 1
  • 24
  • 58
  • 1
    They are not blurred, there's some brightness added. Most likely your OpenGL driver settings are tweaked to see in dark places in first person shooter games :) – Kuba hasn't forgotten Monica Sep 30 '13 at 13:09
  • thx for the useful reply ..the left one is the opengl viewport how i can remove this property ..? can u please help me .. ? its in windows 7 – Wagmare Oct 01 '13 at 04:09

0 Answers0