QWidget::focusNextPrevChild() passes over to the parent (which is the
work area here) if the current window is not a dialog (isWindow()) or
a sub-window (window flag Qt::SubWindow).
We set the latter here to prevent this unwanted behavior.
Let's see if there are side-effects.
replacePB->setEnabled(false);
replacePrevPB->setEnabled(false);
replaceallPB->setEnabled(false);
+
+ // Make this a sub window to prevent focusNextPrevChild (Tab)
+ // switching to the parent (#12170)
+ setWindowFlags(Qt::SubWindow);
}