参考其他作者制作可行!感谢!
参考如下:
https://www.zhihu.com/question/403884614/answer/1307111207
#判断窗体是否已经打开
if self.ChatWindow is not None and self.ChatWindow.isVisible():
return
#判断窗体是否隐藏
if self.ChatWindow is not None and self.ChatWindow.isHidden():
return
新手上路,勿喷!