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.
- PyQt5 - Set icon size of item icon in ComboBox
- PyQt5 - Get the icon size of item icon in ComboBox
- Set Window Icon Text in PyQt5 | setWindowIconText() method
- PYGLET – Setting Window Icon
- PyQtGraph – Getting Plot Window Icon
- PyQtGraph – Setting Plot Window Icon
- PyQt5 – Set Icon for Check Box
- PyQt5 - How to set icon to the each item in ComboBox
- PyQt5 – Add image icon on a Push button
- PyQt5 - How to add icon to Radio Button ?
- PyQt5 - Get the icon of desired item in ComboBox
- PyQt5 QCalendarWidget - Icon Changed Signal
- PyQt5 QCommandLinkButton - Changing Icon
- PyQt5 QCommandLinkButton - Getting Icon
- PyQt5 QCommandLinkButton - Setting Icon Size
- PyQt5 QCommandLinkButton - Getting Icon Size
- PyQt5 QCommandLinkButton - Icon Changed Signal
- PyQtGraph – Setting Window Flag to Plot Window
- PyQtGraph – Getting Window Flags of Plot Window
- Change Icon for Tkinter MessageBox
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.