Make sure MainWindow has focus when we returned from a child QWidget

On a mac, if you simply delete the child QWidget, the focus isn't returned, making all keyboard presses simply doing "beep". Earlier fix done in b2dcd7ba68ae0b3e5b59d8c55cf49603ca1aa7fd didn't help under all circumstances.

Fixes #10587