Problems with Open-Source Downloads read and

QGraphicsView/Scene display "other" QOpenGLWidget?

  • Hey

    Ok so this has been bothering me for a while now.

    2 cases

    1. QGraphicsView = as standard cpu mode
    2. QGraphicsVIew but with setViewport(new QOpenGLWidget())

    now what I would like is to have a QOpenGLWidget with 3d content inside a QGraphicsView. So that I can maybe have 2/3/4+ openGLViewports showing different stuff and me being able to click and drag them like QGraphicsItem/arrange/maybe even overlay? Then once clicked on the QOpenGLWidget itself with a key or modifier take control and emit signal to that QOpenGLWidget to update its content - camera/position etc etc.

    Now what I was thinking so far to do is to use a QGraphicsProxyWidget and just set the widget child to be that QOpenGLWidget... but I do wonder... is there a better way perhaps?


  • Lifetime Qt Champion


    From the looks of it, you might want consider using QtQuick.

  • I looked few times in to QtQuick... not a big fan for the moment tbh. I ended up doing grabFramebuffer() call on the widget and passing it to QGraphicsPixmapItem... not very efficient I think. But for now it "works" still trying to figure out a better way.

Log in to reply