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 + QGraphicsProxy & QOpenGLWidget as item - drawing issue.

QGraphicsView + QGraphicsProxy & QOpenGLWidget as item - drawing issue.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qopenglwidgetqgraphicsviewqgraphicsproxyw
2 Posts 2 Posters 752 Views
  • 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 27 Jan 2019, 09:14 last edited by
    #1

    Hey

    I'm doing some R&D on the idea of dropping openGL widget with scene/textures in to qgraphicsView as a qgraphicsItem/proxy.

    Last time I did it it was working quite well, but lately, when I drop in I have a "ghosting" problems if I move the content inside openGL window everything becomes "smudged" - its like app freezes in windows and we move over it we have that nice "wave" pattern of ghosts...

    I run my graphicsView with these flags:

    setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    setRenderHints(QPainter::Antialiasing | QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
    

    and QOpenGLwidget with this as clear method:

    void paintGL()
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL);
        glClearColor(0.5,0.2,1.0,0.7);
        sceneManager->draw();
        notifyDisplayWidgetOfUpdate(); < pointer to QGraphicsProxyWidget - just telling him to "update()" so that it tells qgraphicsVIew to repaint that widget - I think...
    

    Can any1 think of any reason for this?
    https://pasteboard.co/HYmtjof.png < this should be 1 object, instead, I got the same object overpainted itself.

    It seems that the only time when the widgets gets "cleared up" is when I resize the openGLWidget and it causes it to somehow properly repaint?

    Regards
    Darisuz
    TIA

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Jan 2019, 21:43 last edited by
      #2

      Hi,

      You should add:

      • Which version of Qt you were using before
      • Which version of Qt you are using now
      • Graphics card + driver
      • Platform you are running on

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      27 Jan 2019, 21:43

      • Login

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