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 do I use QMouseDevice and QMouseHandler

How do I use QMouseDevice and QMouseHandler

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 847 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.
  • J Offline
    J Offline
    jefffaust
    wrote on last edited by
    #1

    I have a simple Qt3DCore::QEntity (sphere mesh, material, and transform) that I'm showing in a Qt3DExtras::Qt3DWindow view. I'd like to handle events for mouse clicks on this entity in the view. Ideally, I want to stay in the Qt3D framework for doing this. I've tried various combinations of QMouseDevice + QMouseHandler, but I can't seem to receive notifications from the QMouseHandler slots (entered, exited, pressed, clicked).

    I have not found any examples online and the documentation is lacking. I'm on windows, using vs 2017 with qt 5.9.1.

    All I need to get me going is a simple example of how to hook up QMouseDevice/Handler to an entity.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jefffaust
      wrote on last edited by
      #2

      I don't know why this approach didn't work for me, but I stumbled across Qt3DRender::QObjectPicker, which accomplishes what I want.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sydney
        wrote on last edited by
        #3

        It didn't work for me, either. Let me try!

        You can visit me here:
        My website: http://appnaz.com/android/tell-my-luck-astrology-app-com.kundli.astrology.tellmyluck
        My facebook: https://www.facebook.com/allison.hadid.12

        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