PyQt5 QCalendarWidget - Getting Font Last Updated : 11 Nov, 2022 Comments Improve Suggest changes Like Article Like Report In this article we will see how we can get the font of the QCalendarWidget. A font is a particular size, weight and style of a typeface. Each font was a matched set of type, one piece for each glyph. By changing font we can change the style of the text present in the calendar. We can change/set font using setFont method. In order to do this we will use font method with the QCalendarWidget object. Syntax : calendar.font() Argument : It takes no argument Return : It return QFont object Below is the implementation Python3 # importing libraries 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__() # setting title self.setWindowTitle("Python ") # setting geometry self.setGeometry(100, 100, 650, 400) # calling method self.UiComponents() # showing all the widgets self.show() # method for components def UiComponents(self): # creating a QCalendarWidget object self.calendar = QCalendarWidget(self) # setting geometry to the calendar self.calendar.setGeometry(50, 10, 400, 250) # setting cursor self.calendar.setCursor(Qt.PointingHandCursor) # font font = QFont('Times', 5) # setting font to the calendar self.calendar.setFont(font) # creating label to show the properties self.label = QLabel(self) # setting geometry to the label self.label.setGeometry(100, 280, 250, 60) # making label multi line self.label.setWordWrap(True) # getting font value = self.calendar.font() # setting text to the label self.label.setText("Font : " + str(value)) # create pyqt5 app App = QApplication(sys.argv) # create the instance of our Window window = Window() # start the app sys.exit(App.exec()) Output : Comment More infoAdvertise with us Next Article PyQt5 QCalendarWidget - Getting Font R rakshitarora Follow Improve Article Tags : Python Python-PyQt Python-gui Python PyQt-QCalendarWidget Practice Tags : python Similar Reads PyQt5 QCalendarWidget - Getting Children In this article we will see how we get the children of the QCalendarWidget. Calendar is not alone a single widget it is a mixture of lots of smaller widget which we refer as calendar's child. There are many child such as table view, item delegate etc.  In order to do this we will use children metho 2 min read PyQt5 QCalendarWidget - Getting Focus Proxy In this article we will see how we can get the focus proxy to the QCalendarWidget. Focus proxy is the setting focus to calendar indirectly i.e by setting focus to the child of it. For example some widgets can "have focus", but create a child widget, such as QLineEdit, to actually handle the focus. I 2 min read PyQt5 QCalendarWidget - Getting Title In this article we will see how we can get the title of the QCalendarWidget. Title basically is caption of the QCalendarWidget, caption is basically the name or little hint about the calendar, we can set title to it using setWindowTitle method. In order to do this we will use windowTitle method with 2 min read PyQt5 QCalendarWidget - Getting Focus Widget In this article we will see how we can get the focus widget of the QCalendarWidget. Focus widget is the last child of the calendar that setFocus had been called on. For top level widgets, this is the widget that will get focus in case this window gets activated In order to do this we will use focusW 2 min read PyQt5 QCalendarWidget - Getting Focus Policy In this article we will see how we can get the focus policy of the QCalendarWidget. This property holds the way the widget accepts keyboard focus, there are many focus policy available for calendar like no focus, strong focus, wheel focus etc. We can change focus policy any time with the help of set 2 min read PyQt5 QCalendarWidget - Getting Cursor Shape In this article we will see how we can get the cursor shape of the QCalendarWidget. Cursor is the mouse pointer by default cursor shape i.e cursor look same for both window or calendar although there are a variety of cursor available for calendar, for example, split cursor, size cursor etc. By defau 2 min read PyQt5 QCalendarWidget - Getting Date Text Format In this article, we will see how we can get the date text format to the specific date in the QCalendarWidget. Setting the date text format makes the specified date looks more special such as increasing the size and other features. Below is how a date with date text format looks like.  In order to 2 min read PyQt5 QCalendarWidget - Getting Window Flags In this article we will see how we can get the window flags of the QCalendarWidget. Window flags are a combination of a type (e.g. Qt::Dialog) and zero or more hints to the window system (e.g. Qt::FramelessWindowHint).If the calendar had type Qt::Widget or Qt::SubWindow and becomes a window (Qt::Win 2 min read PyQt5 QCalendarWidget - Getting QActions In this article we will see how we can get the actions of the QCalendarWidget. In order to do this we use actions method, this methods returns the (possibly empty) list of this calendar's actions. In order to do this we will use actions method with the QCalendarWidget object. Syntax : calendar.actio 2 min read PyQt5 QCalendarWidget - Getting Graphics effect In this article we will see how we can get the graphic effect of the QCalendarWidget. A graphic effect is an effect that can be used on a sprite or the Stage, changing their look in some way. Graphic effect can be color shadow anything. It can be set to calendar with the help of setGraphicsEffect me 2 min read Like