Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

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

    General and Desktop
    2
    4
    1166
    Loading More Posts
    • 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
      kenchan last edited by

      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 Reply Quote 0
      • D
        dbzhang800 last edited by

        Hi,

        you mean that

        @
        QMouseEvent::buttons()
        @

        doesn't work for you?

        1 Reply Last reply Reply Quote 0
        • K
          kenchan last edited by

          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 Reply Quote 0
          • K
            kenchan last edited by

            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 Reply Quote 0
            • First post
              Last post