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. [Solved]-Why no mouse button state information in the mouse move event?
Qt 6.11 is out! See what's new in the release blog

[Solved]-Why no mouse button state information in the mouse move event?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k 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.
  • K Offline
    K Offline
    kenchan
    wrote on last edited by
    #1

    Hello,

    I understand from theory and practice that the mouse move events don't provide individual button state information as such.

    I am interested to understand the rational behind the decision to do it this way. I know there are other ways to get the information and I use them myself. However, it would be kind of easier for us all if it was just "there for the asking" as it is with the other mouse events.

    I am not trying to critical or anything. I am just interested to know why it is done that way :-).

    My thanks to anyone who is kind enough to humour me with an answer.

    Thanks in advance.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      Hi,

      you mean that

      @
      QMouseEvent::buttons()
      @

      doesn't work for you?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kenchan
        wrote on last edited by
        #3

        Thank you for your reply,

        Good point sir, I see that I might not be understanding the document correctly. I did not get any states when I tried this one. Since your comment indicates it one should get the states with the buttons() function there must be some other issue in my code that is blocking it.

        I thought it strange to not get the states hence my question.

        Thank you for your help I will look into it again.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kenchan
          wrote on last edited by
          #4

          Hello Again,

          I can now get the mouse button states in the mouse move event. It was my fault that they were not coming through to where I needed them.

          I am relieved to know it was not problem with Qt.

          Thank again for your advice.

          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