Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- urllib
- javascript
- sqlite
- PyQt
- swift
- ASP
- mssql
- IOS
- 리눅스
- port
- Excel
- Unity
- 함수
- 다이어트
- PyQt5
- 맛집
- pandas
- MySQL
- ubuntu
- GIT
- PER
- tensorflow
- Linux
- flutter
- node.js
- python
- 유니티
- MS-SQL
- 날짜
- 라즈베리파이
Archives
아미(아름다운미소)
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