PyQt emulates the minimize button "_"

How to minimize a window in PyQt in the same way as when clicked _?

I use

self.showMinimized()

This really minimizes the window.
But in the previous window there is no reorientation. As if the focus is still on the minimized window.

How can I minimize and reorient the previous window as if the _< button was pressed ? p>

+3
source share
2 answers

(Copying Qiao's comment as an answer :)

I solved the problem with showNormal(), and then showMinimized()again.

0
source

Just plug it in this way

Minimized.clicked.connect(lambda: self.showMinimized())
+2
source

All Articles