Hello guys
Im developing an application for Mac OS X Leopard on Qt - kinda onscreen keyboard.
The thing is I need to make QMainWindow of the application not accepting keyboard focus (user focus) when user clicks on it choosing possible letters (keep it always inactivated). And then send keys to any other apps

I have already tried both:

in Qt setFocusPolicy(Qt::NoFocus) - the window stops getting focusEvents but still grabs keyboard focus
and
in Carbon setting kHIWindowBitNoActivates and kWindowNoActivatesAttribute for this WindowRef

Both variants didnt work.
Are there any workarounds in Qt or any for Carbon?

Afterwards when the window is off-focus I need to send the key to other application(system wide) which currently has user focus. I think CGEventCreateKeyboardEvent and then CGEventPost in Carbon would do the trick or are there any options in Qt?
Im using Qt 4.4 which still utilizes Carbon

Any help will be appreciated..

TIA,
Sergey