Results 1 to 3 of 3

Thread: The Mystery of MouseMove Signals

  1. #1
    Join Date
    Jun 2012
    Posts
    98
    Thanks
    11
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default The Mystery of MouseMove Signals

    So I'm putting together a presentation based on what I've been up in Qt the past couple of weeks and ran into something I haven't figured out yet:

    How Qt tracks mouse movement events.


    My theory at the moment is that since the QApplication (presumably) handles all the mouse input; that it then distributes it to it's current window (all windows? non modal?) (which then propagates the mouse-move-event to it's children where applicable.)

    Does this sound about right?



    Any expansion on this discussion to push me in the right direction or verify my thoughts is very welcome and appreciated,
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: The Mystery of MouseMove Signals

    Native mouse events are received from the operating system by the active application. The event eventually reaches Qt's event dispatcher that maps the data received to the widget under those coordinates. Then it places an event into the event loop. Eventually this event is processed and reaches the destination mouse event handler through a series of calls to QCoreApplication::notify(), QObject::event() and QWidget::mouseMoveEvent() (optionally going through installed event filters).
    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.


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

    tescrin (29th June 2012)

  4. #3
    Join Date
    Jun 2012
    Posts
    98
    Thanks
    11
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: The Mystery of MouseMove Signals

    I just read "notify()" and then investigated into labels.
    *Mind Blown*

    That was my mouse problem! Labels actually *do* care about mouse signals because they need to check if they are editable or not. Had they had no use for the signal (it sounds like) they would have ignored it. It looks like it's doing nothing because I had several variables/flags on that made it do nothing, but it captured the event because it needs to.

    Notify() and such make sense though; as a means in which the event is propagated.

    As a side note, I didn't meant to imply the OS didn't process the mouse/keyboard input and decide who to send it to; I meant after Qt got ahold of it.

Similar Threads

  1. QString mystery
    By JPNaude in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2011, 08:48
  2. Highlight PushButton on mouseMove
    By Shiva in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2010, 13:38
  3. Replies: 2
    Last Post: 24th April 2009, 12:13
  4. Problem in MouseMove Event
    By Gamalof in forum Qt Programming
    Replies: 4
    Last Post: 17th June 2008, 20:24
  5. mouseMove Event
    By fruzzo in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2008, 11:48

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.