Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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

    Hi,

    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
    0_1551162946256_2c4ec64e-01c1-4647-83ed-178afb54cd9d-image.png
    0_1551163010050_cdb588b6-51f9-4c21-a457-afc8933cd378-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