11/23/2013

PyQt4 solution for 한글 path name unicode problems


tmp = QFileDialog.getOpen...(....)

Here, QString "tmp" contains 한글 characters. Therefore..

print tmp -> make error
print unicode(tmp) -> OK


and if one want to print out to a textbox ..

ui.textbox.setText(tmp) -> error
ui.textbox.setText(unicode(tmp)) -> OK


some other ...

os.chdir(tmp) -> error
os.chdir(unicode(tmp)) -> OK

댓글 없음: