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. How to solve Glviewport and QGraphicsview, the mouse event can't through the QGraphicsview to the Glviewport ?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 581 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.
  • ShaeS Offline
    ShaeS Offline
    Shae
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?

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

      ShaeS 2 Replies Last reply
      1
      • ShaeS Offline
        ShaeS Offline
        Shae
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • SGaistS SGaist

          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 ?

          ShaeS Offline
          ShaeS Offline
          Shae
          wrote on last edited by
          #4

          @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

          1 Reply Last reply
          0
          • SGaistS SGaist

            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 ?

            ShaeS Offline
            ShaeS Offline
            Shae
            wrote on last edited by
            #5

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

            1 Reply Last reply
            1

            • Login

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