traywidget.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:kawaii-player 作者: kanishka-linux 项目源码 文件源码
def onTrayIconActivated(self, reason):
        print(reason, '--reason--')
        if reason == QtWidgets.QSystemTrayIcon.Trigger:
            if not ui.float_window.isHidden():
                ui.float_window.hide()
                self.right_menu.h_mode.setText('&Show')
            elif self.right_menu.d_vid.text().lower() == '&attach video':
                ui.float_window.show()
                self.right_menu.h_mode.setText('&Hide')
            else:
                if MainWindow.isHidden():
                    self.right_menu.h_mode.setText('&Hide')
                    if ui.music_mode_dim_show:
                        MainWindow.showNormal()
                        MainWindow.setGeometry(
                            ui.music_mode_dim[0], ui.music_mode_dim[1], 
                            ui.music_mode_dim[2], ui.music_mode_dim[3])
                        MainWindow.show()
                    else:
                        MainWindow.showMaximized()
                else:
                    MainWindow.hide()
                    self.right_menu.h_mode.setText('&Show')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号