Results 1 to 8 of 8

Thread: Qt5 native messages not propogated?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 native messages not propogated?

    I'm not suggesting Qt intentionally interacts with third party APIs. All I'm saying is that Win32 messages that previously reached a third party library in Qt 4.8 (and in Qt 4.7, and I think 4.6 also), now are not reaching it in Qt 5, even though it's still reaching the QWidget. I'm not asking for Qt to forward anything. I'm asking why it's blocking what it previously wasn't.

    I don't understand how the QWidgets are implemented in Win32, but I'm wondering if a perhaps in the promotion of QWidgets to their own module, as well as any possible QPA code changes, Qt 5 might be accidentally blocking certain Win32 messages. Again, not knowing how it works under the hood, I wonder if perhaps it's failing to call DefWndProc() on a few messages that used to call it on. If so, why the change? If the change is accidental, what other side-effects might this cause in compatibility?

    Why does it forward some Win32 messages but not others? Why not forward them all? Why not block them all? A change was made that affects the Win32 events that reach the window. The question is, why? What purpose does it serve, and was it accidental?

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

    Default Re: Qt5 native messages not propogated?

    Quote Originally Posted by ComServant View Post
    I'm not suggesting Qt intentionally interacts with third party APIs. All I'm saying is that Win32 messages that previously reached a third party library in Qt 4.8 (and in Qt 4.7, and I think 4.6 also), now are not reaching it in Qt 5, even though it's still reaching the QWidget. I'm not asking for Qt to forward anything. I'm asking why it's blocking what it previously wasn't.
    How were they "reaching" the library?

    Why does it forward some Win32 messages but not others? Why not forward them all? Why not block them all? A change was made that affects the Win32 events that reach the window. The question is, why? What purpose does it serve, and was it accidental?
    If you want to handle windows events then install a native event filter on the application object.
    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. #3
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 native messages not propogated?

    I'm not sure. I'll just looked at the source of SFML, and this is what it looks like:
    1. Qt creates the window
    2. Qt gives me the HWND
    3. I give SFML the HWND
    4. SFML attaches it's own WndProc callback function to it, but saves the previous (Qt's) WndProc.
    5. SFML receives the messages, processes them, then forwards them to the previous (Qt's) WndProc.


    So it looks like SFML gets to process the Win32 events before Qt. I don't know why SFML is not processing the key presses (but is receiving mouse messages) then, but why it was previously with Qt 4.8.

    It looks like I was investigating the wrong API - thanks for the help.

  4. #4
    Join Date
    Feb 2014
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Qt5 native messages not propogated?

    Greetings,

    I've been on this case for awhile now and I still couldn't figure why SFML does not process mouse wheel and keyboard inputs anymore.

    Could you tell us how you fixed it?

    Note: It is clearly a QT modification from 4.8 to 5.x that brought this issue.

    Thank you!

  5. #5
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 native messages not propogated?

    It's definitely a Qt issue, and I haven't gotten it working. I'm using Qt 5.0.1 - maybe someone has fixed it in a more recent update, but I can't check anytime soon.

    I receive events for: Mouse movement and mouse button presses (include the middle button, which is the scroll wheel), but I don't receive events for mouse wheel movement or keypresses, even though the QWidget is clearly getting them.

    I wonder if Qt treats mouse wheel in the same way as keypresses, and whether it is failing to call the Win32 DefWindowProc on them, or something.

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

    Default Re: Qt5 native messages not propogated?

    Please provide a minimal compilable example demonstrating the problem.
    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.


Similar Threads

  1. Get Windows Messages
    By METEOR7 in forum Qt Programming
    Replies: 7
    Last Post: 2nd January 2012, 17:27
  2. Printing Messages Only once
    By purplecoast in forum Qt Programming
    Replies: 0
    Last Post: 3rd October 2010, 21:15
  3. Getting messages sent by PostMessage
    By Luc4 in forum Qt Programming
    Replies: 5
    Last Post: 19th May 2010, 16:13
  4. Qt4 no debug messages
    By TheKedge in forum Newbie
    Replies: 3
    Last Post: 23rd January 2006, 17:52

Tags for this Thread

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.