I'm not able to comment on Rosh's answer, so noting here - for PyQt 5.7 on Devuan, if you toggle the WindowStaysOnTopHint flag on a QDialog after it is shown, the window disappears and you need to show() it again immediately after. Other than this it works.