[Qt-interest] Qt-interest Digest, Vol 13, Issue 202
Ross Driedger
ross at earz.ca
Wed Dec 23 14:37:14 CET 2009
On Wed, 23 Dec 2009 04:29:45 -0500, <qt-interest-request at trolltech.com>
wrote:
> Hi All,
> We are having an issue where events are being blocked when a dialog box
> title bar is right clicked. Right clicking the title bar pops up the
> "Move, Size, Minimise, Maximise, Close" menu box.
> We have tried to use the event filter to catch the event and force it to
> process all events via QCoreApplication::processEvents
> (QEventLoop::AllEvents ) to no avail. So we printed to std out all the
> event types to see what the last event is whilst right clicking on the
> title bar. There was no event at all once the right click was carried
> out. We were expecting a right click event at least.
> So as a work around, is there a way to stop this menu from being popped
> up? Or is there another solution?
Hi Jay,
I dealt with this issue last year in a Win32 project so I had direct
access to the window's callback and I don't know how this hooks into the
Qt code, but here are some of the important issues wrt to the system menu:
1) System menu clicks are sent via WM_SYSCOMMAND message. I don't know
how Qt deals with this message, but MS recommends that it gets passed
directly to the default winProc.
2) WM_COMMAND messages are suspended until the system menu is dealt with.
All subsequent messages from the menu are not WM_COMMAND messages.
The end result is that the control of the program is passed back to the
operating system until the user dismisses the menu or executes a command
from it. This can be changed if the program traps and deals with
WM_SYSCOMMAND, but this would be against the kind of behaviour that MS
wants for Windows apps.
How to get this specific Windows message within Qt is beyond my knowledge
and I leave it to some of the Gurus of the Qt internals.
I will be watching if there is a solution to this problem.
Ross
--
"Music is essentially useless, as life is."
George Santayana
Ross Driedger
ross_at_earz.ca
More information about the Qt-interest-old
mailing list