I know this is an old thread but I am posting this in case anyone else comes across it. I was able to get the focus events working during tests without having to show the widget. I called "QApplication::setActiveWindow(patient_);", where patient is my main widget which holds other widgets in it like line edits etc. After this focus events propagated properply.
Bookmarks