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 get back actual coordinate from qopenglwidget
Qt 6.11 is out! See what's new in the release blog

How to get back actual coordinate from qopenglwidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 440 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Md Saif Khan
    wrote on last edited by
    #1

    I have plotted multiple line using linestrip in qt opengl. I have added some coordinate Like (x=5431073.1837, y=7668055.24341, z=0). Now i want to get back the same coordinate while i keep my mouse on the same position. I have tried with mouse movement global position and local position. But it does not show exact coordinates value. I am new in qt. Can anyone tell me how to solve this problem?

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

      Hi,

      How exactly did you do that ?
      How do you setup your OpenGL scene ?

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

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        How exactly did you do that ?
        How do you setup your OpenGL scene ?

        M Offline
        M Offline
        Md Saif Khan
        wrote on last edited by
        #3

        @SGaist Hi.
        I am not sure if i am giving correct answer or not!! I have used shader program glDrawArray. And used modelMatrix, viewMatrix and projectionMatrix. I fetching data from a vector where lots of data are added.

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

          Then you have to translate the mouse position on your widget to something that makes sense in your scene.

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

          1 Reply Last reply
          0

          • Login

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