Important: Please read the Qt Code of Conduct -

How to solve Glviewport and QGraphicsview, the mouse event can't through the QGraphicsview to the Glviewport ?

  • but the wheel event can use both Graphicsview and glviewport.
    Glviewport use drawbackgroud render.but the mouse event do not recived in the Glviewport

  • Lifetime Qt Champion


    The description is a bit obscure. Can you show the code you are using ?

    What version of Qt are you using ?
    On what platform ?

  • with the QT4.8 on centos7.2. I want to show OSG in QGraphicsview, bind the glviewport and graphicsview to show 2D and 3D graphics. overwrite the graphicsview's drawbackgroud func, the can show 2D and 3D ,but it seems the 3D graphics as the background .the mouse event can only use in 2D QGraphicsview.![alt text](![0_1551144007381_51a5c1a1-3ad8-453c-9f8b-2450ef48c38c-image.png](Uploading 0%) image url) like this.the black was 2D

  • @SGaist 0_1551162852932_97a8719f-6b06-40d8-818b-0dca1be574eb-image.png
    It seems like they are two view

  • @SGaist thanks for your reply I solved this problem ,for I missed overwite the mouse move event ,so the model don't change range

Log in to reply