main_ui_interface.py 文件源码

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

项目:EMFT 作者: 132nd-etcher 项目源码 文件源码
def __call__(self, *args, **kwargs):
        if constant.MAIN_UI is None:
            raise RuntimeError('Main UI not initialized')

        # Check if this was called in the main thread (the one running Qt EventLoop)
        # noinspection PyProtectedMember
        if isinstance(threading.current_thread(), threading._MainThread):

            # If we are in the EventLoop, there's no need to dispatch the call to the a signal
            # noinspection PyProtectedMember
            constant.MAIN_UI._do('main_ui', self.func.__name__, args, kwargs)
        else:

            # Otherwise, queue the call
            constant.MAIN_UI.do('main_ui', self.func.__name__, *args, **kwargs)


# noinspection PyAbstractClass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号