I have a mainwindow and a button on this mainWindow that opens a popup. Now I want to force the focus on that popup.
Right now i am doing
mainwindow.setEnabled(False)
popup.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
when the popup is opened and
mainwindow.setEnabled(True)
when the popup is closed, but that does not affect the focus.
Is there another way, than to catch the signal that the mainwindow got the focus and force it back to the popup?