我有一个场景,路径(在我的程序中设置)存储在json文件中,我需要在QLabel上显示它
# self.progSettings is a dictionary containing the json content
labelStr = self.progSettings['testReportPath']
# labelStr now contains "C:\temp\testreports"
self.pathLabel = QLabel(labelStr) # No escape characters -> problem
为了正确显示路径,我需要避开反斜杠,但我不知道如何轻松地以“正确”的方式完成
谢谢 尼古拉斯
目前没有回答
相关问题 更多 >
编程相关推荐