Results 1 to 2 of 2

Thread: Qpixmap blurs when using opengl viewport in QGraphicsview

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qpixmap blurs when using opengl viewport in QGraphicsview

    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

    Qt Code:
    1. View->scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
    2. View->setRenderHint(QPainter::Antialiasing, false);
    3.  
    4. QGLFormat fmt;
    5. fmt.setSampleBuffers(true);
    6. fmt.setSamples(2);
    7. //View->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
    8. View->setViewport(new QGLWidget(fmt));
    9.  
    10. View->setOptimizationFlags(QGraphicsView::DontSavePainterState | QGraphicsView::DontAdjustForAntialiasing);
    11. View->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    12. View->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
    13.  
    14. View->setCacheMode(QGraphicsView::CacheBackground);
    To copy to clipboard, switch view to plain text mode 

    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

    ..withOpenGL.jpg and with opt open gl
    wtOutOpenGL.jpg
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qpixmap blurs when using opengl viewport in QGraphicsview

    is it a problem with opengl settings in windows 7 operating system ..?
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. QGraphicsView inside of QAbstractItemView viewport
    By Paladin12 in forum Qt Programming
    Replies: 5
    Last Post: 24th January 2016, 14:15
  2. Replies: 3
    Last Post: 12th October 2012, 10:44
  3. Replies: 5
    Last Post: 9th January 2012, 21:22
  4. Replies: 2
    Last Post: 26th February 2009, 10:12
  5. Replies: 3
    Last Post: 12th February 2008, 21:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.