Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
Python PyQt5 setStyleSheet 적용 방법 본문
Python PyQt5 선택한 날짜에 setStyleSheet backgroundcolor #33ccff 적용
'''
Created on 2018. 12. 19.
@author: bhm
'''
from PyQt5 import QtWidgets
QSS = '''
QCalendarWidget QAbstractItemView
{
selection-background-color: #33ccff;
selection-color: white;
}
'''
class CalendarWidget(QtWidgets.QCalendarWidget):
def __init__(self, parent=None):
super(CalendarWidget, self).__init__(parent,
verticalHeaderFormat=QtWidgets.QCalendarWidget.NoVerticalHeader,
gridVisible=False)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
app.setStyleSheet(QSS)
w = CalendarWidget()
w.show()
sys.exit(app.exec_())
'랭귀지 > python' 카테고리의 다른 글
| python PyQT 에서 이미지를 윈도우에 표시하는 방법 (0) | 2018.12.29 |
|---|---|
| Python PYQT5를 사용하여 QTableWidget 셀을 읽기 전용으로 만드는 방법 (0) | 2018.12.22 |
| Python PyQt QDate 형식으로 날짜변경 (0) | 2018.12.20 |
| Python pyqt tableWidget double click event (2) | 2018.12.19 |
| python PyQt에서 QCalendarWidget을 사용하여 날짜선택하기 (0) | 2018.12.18 |
Comments