from
PyQt5.QtWidgets
import
*
from
PyQt5
import
QtCore, QtGui
from
PyQt5.QtGui
import
*
from
PyQt5.QtCore
import
*
import
sys
class
Window(QMainWindow):
def
__init__(
self
):
super
().__init__()
self
.setWindowTitle("Python ")
self
.setGeometry(
100
,
100
,
650
,
400
)
self
.UiComponents()
self
.show()
def
UiComponents(
self
):
self
.calendar
=
QCalendarWidget(
self
)
self
.calendar.setGeometry(
50
,
10
,
400
,
250
)
self
.calendar.setCursor(Qt.PointingHandCursor)
format
=
QTextCharFormat()
format
.setFont(QFont(
'Times'
,
15
))
date
=
QDate(
2020
,
6
,
10
)
self
.calendar.setDateTextFormat(date,
format
)
App
=
QApplication(sys.argv)
window
=
Window()
sys.exit(App.
exec
())