0

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()

mmd
  • 57
  • 5
  • Your question is a bit unclear. Please take your time, try to explain yourself better, and also provide a valid [mre]. – musicamante Dec 27 '22 at 02:50
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 27 '22 at 10:55

0 Answers0