开发者

PyQt emulate minimize button "_"

开发者 https://www.devze.com 2023-03-07 19:35 出处:网络
How can I minimize window in PyQt the same way as w开发者_开发技巧hen _ is pressed? I use self.showMinimized()

How can I minimize window in PyQt the same way as w开发者_开发技巧hen _ is pressed?

I use

self.showMinimized()

It really minimizes window.

But there is no refocus to the previous window. As if focus is still on minimized window.

How can I minimize and refocus to the previous window as if minimize button _ is pressed?


Just Connect it this way

Minimized.clicked.connect(self.showMinimized)


(Copying Qiao's comment as an answer:)

I solved my problem with showNormal() and then showMinimized() once again.

0

精彩评论

暂无评论...
验证码 换一张
取 消