UITranslator.py 文件源码

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

项目:universal_tool_template.py 作者: shiningdesign 项目源码 文件源码
def newLang_action(self):
        if len(self.memoData['fileList'].keys()) == 0:
            print("You need have UI name structure loaded in order to create a new language.")
        else:
            text, ok = QtWidgets.QInputDialog.getText(self, 'New Translation Creation', 'Enter language file name (eg. lang_cn):')
            if ok:
                if text in self.memoData['fileList'].keys():
                    print("This Language already in the table.")
                else:
                    self.uiList['dict_table'].insertColumn(self.uiList['dict_table'].columnCount())
                    index = self.uiList['dict_table'].columnCount() - 1
                    self.uiList['dict_table'].setHorizontalHeaderItem(index, QtWidgets.QTableWidgetItem(text) )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号