Results 1 to 12 of 12

Thread: Strange mouseReleaseEvent behaviour.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Strange mouseReleaseEvent behaviour.

    Quote Originally Posted by spirit View Post
    your code will work in this case, i.e. if you pressed two or more mouse buttons then QMouseEvent::buttons will retrun all pressed buttons, that's why this function doesn't work for one button.
    I think that it doesn't work because it returns the current state of the buttons and so in release event no buttons are in the pressed state while in mouse move they are. So the same code put in mouseMove will work while it doesn't with mouseRelease. button() on the other hand returns the button that caused the event (regardless of its current state).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    ricardo (5th May 2009)

  3. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: Strange mouseReleaseEvent behaviour.

    I talked about CMyGLDrawer::mouseReleaseEvent and QMouseEvent::buttons not about moveEvent.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. The following user says thank you to spirit for this useful post:

    ricardo (5th May 2009)

Similar Threads

  1. Strange xml behaviour when opening the file.
    By cbarmpar in forum Qt Programming
    Replies: 5
    Last Post: 28th September 2008, 20:44
  2. qinputdialog strange behaviour
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2008, 19:29
  3. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 17:38
  4. Replies: 1
    Last Post: 26th February 2006, 05:52
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 06:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.