Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
python PyQT 에서 이미지를 윈도우에 표시하는 방법 본문
How to display an image onto a PyQT window
QLabel은 setPixmap 메서드를 가지고 있기 때문에 이미지를 표시 할 수 있습니다.예제)
lb = QtGui.QLabel(self) pixmap = QtGui.QPixmap("{경로/파일}") height_label = 100 lb.resize(self.width(), height_label) lb.setPixmap(pixmap.scaled(lb.size(), QtCore.Qt.IgnoreAspectRatio)) self.show()
'랭귀지 > python' 카테고리의 다른 글
Python pyqt5 QTableWidget 너비 높이 조정 (0) | 2018.12.31 |
---|---|
Python Pyqt QVBoxLayout의 너비 설정 (0) | 2018.12.30 |
Python PYQT5를 사용하여 QTableWidget 셀을 읽기 전용으로 만드는 방법 (0) | 2018.12.22 |
Python PyQt5 setStyleSheet 적용 방법 (0) | 2018.12.21 |
Python PyQt QDate 형식으로 날짜변경 (0) | 2018.12.20 |
Comments