PyQt QString Unresolved reference
PyQT4 Tutorials 내용중 QT4 Tables 코드에서 에러 발생 (PyQt QString Unresolved reference)
How to create QString in PyQt4? 내용을 참고하면, Python3 에서 QString은 자동적으로 네이티브 파이썬 string으로 매핑된다고 함.
In Python 3, QString is automatically mapped to the native Python string by default:
The QString class is implemented as a mapped type that is automatically converted to and from a Python string. In addition a None is converted to a null QString. However, a null QString is converted to an empty Python string (and not None). (This is because Qt often returns a null QString when it should probably return an empty QString.)
The QChar and QStringRef classes are implemented as mapped types that are automatically converted to and from Python strings.
The QStringList class is implemented as a mapped type that is automatically converted to and from Python lists of strings.
The QLatin1Char, QLatin1String and QStringMatcher classes are not implemented.
http://pyqt.sourceforge.net/Docs/PyQt4/qstring.html
따라서 해당 코드는 QString을 제거하는 방식으로 해결.
# set label
table.setHorizontalHeaderLabels("H1;H2;").split(";"))
table.setVerticalHeaderLabels(("V1;V2;V3;V4").split(";"))
참고
'Programming > Python' 카테고리의 다른 글
python decode error - UnicodeDecodeError: ‘utf-8’ codec can’t decode (0) | 2016.06.22 |
---|---|
[python] 알아보기 01 (0) | 2016.04.11 |
[python] 파이썬 정규표현식 - 파일 읽기, 저장 (0) | 2016.03.04 |
Python 설치 (2) | 2016.03.03 |
[python] 체크 확인(Check the Check) - 정규표현식 (0) | 2015.11.01 |
댓글