PDA

View Full Version : Qpixmap blurs when using opengl viewport in QGraphicsview



wagmare
30th September 2013, 09:01
hi friends,

I have used QPixmap Item to display the images in QGraphicsview viewport
as im loading thousands of pixmaps at a time , i decided to set some options to make cache for the pixmap im loading for the images .
so i did


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::DontSavePainte rState | QGraphicsView::DontAdjustForAntialiasing);
View->setViewportUpdateMode(QGraphicsView::FullViewportU pdate);
View->setTransformationAnchor(QGraphicsView::AnchorUnder Mouse);

View->setCacheMode(QGraphicsView::CacheBackground);


if i dont 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 than normal .
i attached the screenshots of bot cases with the thread .
please help me

..9646 and with opt open gl
9647

wagmare
1st October 2013, 05:18
is it a problem with opengl settings in windows 7 operating system ..?