[PySide] toggle "window on top" behaviour

Jabba Laci jabba.laci at gmail.com
Tue Dec 11 07:42:40 CET 2012


Hi,

I'm new to the list and to pyside too. I would like to toggle my
window's "on top" behaviour with a checkbox. When clicked, I call this
function:

    def window_on_top(self):
        if self.checkboxTop.isChecked():
            self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
        else:
            self.setWindowFlags(self.windowFlags() & ~Qt.WindowStaysOnTopHint)

However, when I click on the checkbox, the application window
disappears (minimizes but doesn't appear on the tray). I need to kill
the process from command line.

Thanks,

Laszlo



More information about the PySide mailing list