[PySide] toggle "window on top" behaviour
Jabba Laci
jabba.laci at gmail.com
Tue Dec 11 12:26:03 CET 2012
Thanks a lot, works like a charm. There is a little flashing effect
since the window starts to disappear then it comes back, but it's not
a problem for my little application.
Best,
Laszlo
On Tue, Dec 11, 2012 at 10:30 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> Looks like you need to re-show the window.
> http://stackoverflow.com/questions/2855968/how-do-i-toggle-always-on-top-for-a-qmainwindow-in-qt
>
> --
> anatoly t.
>
>
>
> On Tue, Dec 11, 2012 at 9:42 AM, Jabba Laci <jabba.laci at gmail.com> wrote:
>>
>> 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
>> _______________________________________________
>> PySide mailing list
>> PySide at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/pyside
>
>
More information about the PySide
mailing list