WindowStaysOnBottomHint is a default option when running the program.
class WindowClass(QWidget, form_class):
def __init__(self):
super().__init__()
self.setupUi(self)
flags = Qt.WindowFlags(Qt.Tool | Qt.FramelessWindowHint | Qt.WindowStaysOnBottomHint)
self.setWindowFlags(flags)
And I want it to change to WindowStaysOnTopHint with a button, however it is not working properly This is what I have tried with clicking a menu option
onTop.triggered.connect(lambda: self.setWindowFlags(Qt.WindowFlags(Qt.Tool | Qt.FramelessWindowHint |Qt.WindowStaysOnBottomHint)))
onTop.triggered.connect(lambda: self.show())
The code is just toggling the WindowStaysOnBottomHint instead of changing it to WindowStaysOnTopHint There is no error displaying while running onTop.triggered.connect()