QgraphicsScene & openGL, which can be the best approach to mix both ?



  • I'm going to start my vectorial viewer app develop.
    I have explored the 2D and 3D QT tools and I have the impression that I have to create two independents data worlds.
    The Qgrapchicsscene needs 'items', the opengl needs raw data ....
    What is your opinion ? QML 3D ¿

    QT5 can be offer my a best way to do this ?
    Thanks



  • There are examples available on how to mix them. A bit of googling will bring them on your screen. From the top of my head, they use a QGLWidget as the viewport widget for a QGraphicsView, and then leverage QGraphicsView::drawBackground or ::drawForeground to render GL stuff into that viewport while layering the graphics items on top.



  • Thanks.
    But you are agree with me that I cant do a 3D render using the items of GraphicsScene , ins't ?
    And what about QML3D?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.