Focus Problems with ArcObjects Cross-Platform C++ SDK

Discussion created by cyohman on Mar 4, 2011
Target Environment
Development OS: 64-bit Windows 7
Deployed OS: 32-bit Windows XP
Toolkit: Qt 4.2.3

In the next three videos, please note the issue. At start-up, a user can hover across the toolbar and it brings up the tool tip for each command/tool. When a user presses a command/tool the main application window loses focus. If the user hovers across the toolbar now, there are no tooltips- obviously. If the user subsequently clicks commands, then they appear raised  and tooltips still do not work while the main application window does not have focus. Tools function properly other than no tooltips.

If the video is too small, then please run it full-screen.

Qt4 Toolkit

WxWidgets Toolkit

GTK Toolkit

Please note the Visual C++ SDK behaves normally. The main window does not lose focus. The delay when I click Fixed Zoom-In is from labeling.

My question is, for the Qt example, how do I get the focus to return to the main window after clicking an item on the toolbar? I suppose I could use the IToolbarControlEvents interface to capture one of the mouse actions, but how would I return the focus to the main window? Would I pass the QMainWindow into the IToolbarControlEvents implementation constructor or access it through the QAxCtl through the IToolbarControl interface(how?) and then accessing the QMainWindow through QAxCtl through accessing parent widgets (provided they had been set) until I reached the top level?

Thanks in advance. :)

The examples used here are: