[Interest] Clearing plugin windows focus

Nuno Santos nunosantos at imaginando.pt
Fri Dec 4 21:37:22 CET 2015


Hi,

When I open a Qt Plugin window on a existing app on Mac using QMacNativeWidget, I can avoid it having focus by setting the attribute Qt::WA_ShowWithoutActivating

The problem is that as soon as I interact with its content, it gets focus and I can’t reverse this state.

I would like to clear focus on demand. Curiously, when I try to call the function clearFocus, it crashes. 

Is there anyway to clear or toggle the focus on demand when the windows has another application as parent? This is specially important on my application because the plugin host creates events on key presses and I would like to have the ability to change controls on the plugin window and hear the result of the changes thru the key presses. 

By other hand, I would also want to be able to write text on the plugin window, so, in that case, having the ability to retrieve focus is essential.

Any ideas on how to achieve this?

Thanks,

Regards,

Nuno Santos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151204/51d56726/attachment.html>


More information about the Interest mailing list