This is a follow up to an outstanding question, the solution to which appears to be that I have to make my Qt application the child of another application, specifically the active window that has input focus. I need to do this so that my Qt application automatically has input focus, without the user having to first click on it. (This is necessary because the Qt application is launched by a background process.)
I am aware of QWinWidget -- "a Qt widget that can be child of a native Win32 widget". Unfortunately, my application is based on QMainWindow and there is no obvious way to make it derive from QWinWidget.