Pyside Remove window flags
Window flags would normally be OR'd together with the existing flags:
print(int(self.windowFlags()))
self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
print(int(self.windowFlags()))
Then to remove the flag, AND it out using the flag's negation:
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowStaysOnTopHint)
print(int(self.windowFlags()))