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
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