我有一个奇怪的问题:ImportError:无法导入name OptionsTRANUSDialog 在file OptionsTRANUSDialog中,我可以通过以下方法获取我的checked_list:
model = self.scenarios.model()
checked_indexes = model.match(model.index(0, 0), QtCore.Qt.CheckStateRole,QtCore.Qt.Checked, -1,QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive)
for index in checked_indexes:
item = model.itemFromIndex(index)
item_text = item.text()
self.checked_list.append(item_text)
if self.checked_list != [] :
dialog = LaunchTRANUSDialog(parent=self)
dialog.show()
result = dialog.exec_()
我想在另一个文件中使用这个选中的\u列表(launch_tranus_对话框),所以我将导入放在这个文件中:
^{pr2}$当我执行时,我得到了一个错误: ImportError:无法导入名称选项TranusDialog
我真的不明白这个导入错误。在
你能帮帮我吗。在
谢谢。在
目前没有回答
相关问题 更多 >
编程相关推荐