Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsView + QGLWidget setRenderHints not working

QGraphicsView + QGLWidget setRenderHints not working

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 792 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    P.Petitprez
    wrote on last edited by
    #1

    Hello,

    I'm very new to 2D drawing with Qt. I draw QGraphicsItems (mostly items based on Bezier curves) that are in a QGraphicsScene thanks to a QGraphicsView (such as explained in the documentation). When I set no viewport to this QgraphicsView, using setRenderHints(QPainter::Antialiasing) provides a nice antialiasing on my plots.
    But I need to set the QGraphicsView viewport to be a QGLWidget (because of OpenGL drawing in the background), and when I use setViewport(myQGLWidget), it looks like the setRenderHints() does nothing : no more antialiasing on my plots.

    I tried using setFormat(QGLFormat(QGL::SampleBuffers)) in the QGLWidget, but it does not provide as much possibilities as using the QGraphicsView's setRenderHints method.

    What am I doing wrong ? How can I use QGraphicsView's setRenderHints with a QGLWidget viewport ?

    Thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved