When we design a PyQt5 application we see an icon on the top left corner, by default it looks like this :
In this tutorial, we will see how to change the icon according to the user need, in order to do this we use
setWindowIcon() method and to load the icon
QIcon will be used which belongs to
Syntax : setWindowIcon(QtGui.QIcon(‘icon.png’))
Argument :bIt takes file name if file is in same folder else file path.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course