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. Mouse Double-Click Event
QtWS25 Last Chance

Mouse Double-Click Event

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 9.4k 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.
  • T Offline
    T Offline
    tcampos
    wrote on last edited by
    #1

    Hi there,

    I have a doubt about the events that are generated by a mouse double click action since I've read on another forum that after the mouseButtonDblClick comes a second mouseButtonRelease. I'm getting only one mouseButtonRelease. Isn't it suppose to return another one after mouseButtonDblClick?

    This is what i get in the following order:

    • mouseButtonPress;
    • mouseButtonRelease;
    • mouseButtonDblClick.

    Thanks in advance.

    1 Reply Last reply
    0
    • BilbonSacquetB Offline
      BilbonSacquetB Offline
      BilbonSacquet
      wrote on last edited by
      #2

      The sequence is: press -> release -> double click (by default = press) -> release.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tcampos
        wrote on last edited by
        #3

        Are you really sure? I'm using a counter variable to count mouseButtonRelease events and each double click action with the mouse is returning only one release event...

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          AFAIK, this depends on the OS you are on. Mouse and keyboard events are typically processed by the OS and then send to Qt which creates the Qt events.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • BilbonSacquetB Offline
            BilbonSacquetB Offline
            BilbonSacquet
            wrote on last edited by
            #5

            Of course I use the first platform I have: Windows XP ... but I could check too under linux.
            You have right Gerolf it depends of the platform, however I doubt that Qt implement an extra 'press' if no 'release' is sent.

            press -> release -> press (double click) [ -> press for the next ... ] breaks the invariant of press/release counts.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tcampos
              wrote on last edited by
              #6

              I'm using Windows 7.

              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