My Qt5 desktop application shows a modal dialog right after showing the main window. The main window is shown as full screen with Qt::FramelessWindowHint flag. The problem is when I close the dialog, the focus does not return to the main window. This is true for any dialog opened subsequently in the application.
A particular button on the main window is supposed to have focus and is set by calling QWidget::setFocus(). But still the focus is not visible on that button (highlight with a different color on focus). I also observed that QApplication::activeWindow() returns NULL at this point. The focus is seen only when an empty area of the main window is clicked with mouse. This makes it difficult to work with keyboard only.
There is no issue when deployed on Windows and Ubuntu and it works perfectly. But the problem is observed when deployed on Yocto Linux.
Yocto Linux is running without a Window Manager and Desktop Environment. Can this be an issue for the window not to get activated automatically?