main.py 文件源码

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

项目:django-runner 作者: awecode 项目源码 文件源码
def show_window(self):
        self.load()
        try:
            from win32gui import SetWindowPos
            import win32con

            SetWindowPos(self.winId(),
                         win32con.HWND_TOPMOST,
                         # = always on top. only reliable way to bring it to the front on windows
                         0, 0, 0, 0,
                         win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_SHOWWINDOW)
            SetWindowPos(self.winId(),
                         win32con.HWND_NOTOPMOST,  # disable the always on top, but leave window at its top position
                         0, 0, 0, 0,
                         win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_SHOWWINDOW)
        except ImportError:
            pass

        self.raise_()
        self.showMaximized()
        self.setWindowState(self.windowState() & ~Qt.WindowMinimized | Qt.WindowActive)
        self.activateWindow()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号