목록QTableWidget (1)
YOGYUI
PyQt5 - QTableWidget Column Header Label 가져오기
QTableWidget의 Column 헤더 라벨(텍스트)는 setHorizontalHeaderLabels(List[srt]) 메서드로 한번에 수정할 수 있지만, 설정된 라벨들을 한번에 가져오는 인터페이스는 내가 알기론 구현되어 있지 않다 대신, horizontalHeaderItem(int) 메서드를 통해 각 열의 헤더에 할당되어 있는 QTableWidgetItem을 호출한 뒤 text() 메서드로 각 열 헤더의 라벨을 가져올 수 있다 [예제 코드] if __name__ == '__main__': import sys from PyQt5.QtCore import * from PyQt5.QtWidgets import * app = QCoreApplication.instance() if app is None: ..
Software/Python
2021. 6. 21. 15:04