在使用str 以及QtString的时候,会有中文显示乱码的问题; 尝试了很多种方法,最终的解决方案时,修改默认的编码格式: 使用: import reload(sys) sys.setdefaultencoding('utf8')