UITranslator.py 文件源码

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

项目:universal_tool_template.py 作者: shiningdesign 项目源码 文件源码
def __init__(self, parent=None, mode=0):
        super_class.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version="2.0"
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage

        self.fileType='.UITranslator_EXT'
        # mode: example for receive extra user input as parameter
        self.mode = 0
        if mode in [0,1]:
            self.mode = mode # mode validator

        self.location = ""
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(__file__) # location: ref: sys.modules[__name__].__file__

        # Custom variable

        #------------------------------
        # initial data
        #------------------------------
        self.memoData['data']=[]

        self.setupStyle()
        if isinstance(self, QtWidgets.QMainWindow):
            self.setupMenu() # only if you use QMainWindows Class
        self.setupWin()
        self.setupUI()
        self.Establish_Connections()
        self.loadData()
        self.loadLang()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号