PyQt5 QSpinBox - Adding Description Last Updated : 14 Feb, 2023 Comments Improve Suggest changes Like Article Like Report In this article we will see how we can set description to the spin box, description is the detailed information about the combo box which tells about the functionality use cases and other main information to understand the working of the spin box. Description is used by the programmer for better understandability of the program. In order to do this we use setAccessibleDescription method. Syntax : spin_box.setAccessibleDescription(text) Argument : It takes string as argument Return : It returns None 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, 600, 400) # calling method self.UiComponents() # showing all the widgets self.show() # method for widgets def UiComponents(self): # creating spin box self.spin = QSpinBox(self) # setting geometry to spin box self.spin.setGeometry(100, 100, 250, 40) # setting prefix to spin self.spin.setPrefix("Prefix ") # setting suffix to spin self.spin.setSuffix(" Suffix") # text for description text = " This is description of spin box " # adding description to the spin box self.spin.setAccessibleDescription(text) # 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 QSpinBox - Retrieving Description R rakshitarora Follow Improve Article Tags : Python Python-PyQt Python-gui Python PyQt-SpinBox Python PyQt-SpinBox-stylesheet +1 More Practice Tags : python Similar Reads PyQt5 QSpinBox - Adding border In this article we will see how we can add border to the spin box, by default spin box has a black color border although we can change it below is how customized border looks like. In order to do this we have to change the style sheet code associated with the spin box, below is the stylesheet code Q 2 min read PyQt5 QSpinBox â Accessing caption In this article we will see how we can access the caption of the spin box, caption is basically the heading of the spin box but it is not visible caption is for only back end purposes. Caption of spin box is similar to the caption of the main window. In order to do so we use windowTitle method. Synt 2 min read PyQt5 QSpinBox - Adding Prefix In this article we will see how we can add prefix to the spin box, prefix is basically the text which is inserted before the value of spin box, prefix remain constant for each value of spin box i.e it is not editable. In order to add prefix we will use spin_box.setPrefix method. Syntax : spin_box.se 1 min read PyQt5 QSpinBox - Retrieving Description In this article we will see how we can get the description of the spin box, description is the detailed information about the combo box which tells about the functionality use cases and other main information to understand the working of the spin box. Description is used by the programmer for bettte 2 min read PyQt5 QSpinBox - Adding action In this article we will see how we can add action to the spin box, action basically a method called by spin box every time its value get changed. Adding action to the spin box as every time user change the value something should happen. In order to add action we will use spin_box.valueChanged.connec 2 min read PyQt5 QDateEdit - Assigning Description In this article we will see how we can assign a description to the QDateEdit. Description property holds the date edit's description as seen by assistive technologies. The accessible description of a date edit should convey what date edit does. While the accessible name should be a short and concise 2 min read Like