How to minimize the program PyQt5?

There is a program with a property on top of other Windows and placed in a certain place of the screen. When you do certain actions you need to collapse it, and then, when pressing a global hotkey(it already is) to deploy. MyWin.showMinimized(self) works as a strange, collapses it so that even manually deploy. How can this be done?'
upd. Empirically it was found that without the function on top of minimized works as it should. On top of all Windows I have is in the body of the class: MyWin.setWindowFlag(self,Qt.WindowStaysOnTopHint). Accordingly, it is necessary as that to cut down when you call folding.

upd2. Brought staytop to the function initially, it is true, after minimized she falls, after the reverse maximised it is again true. Like all triggers, the prints are displayed when necessary, but no result. It remains in minimized mode, from which it did not deploy.

def StayTop(self):
 if self.top is True:
MyWin.setWindowFlag(self,Qt.WindowStaysOnTopHint)
print('StayTop')
else:
MyWin.setWindowFlag(self,Qt.WindowStaysOnBottomHint)
 print('StayBottom')


123 print is, print ShowM no.
self.top = True
self.StayTop()
print('123')
MyWin.showMaximized(self)
 print('showM')
March 19th 20 at 08:27
0 answer

Find more questions by tags PyQtPython