I'm seeking a way to modify the icon on the top left position of the window and also the icon in the task bar at the bottom of the screen
The answer of Netwave changed the icon of the window but not the one in the taskbar.
from PyQt5.QtWidgets import *
import sys
class GUI(QMainWindow):
def __init__(self, parent=None):
super(GUI, self).__init__()
self.parent = parent
self.setWindowIcon(QIcon(QPixmap(os.path.join('icons','pulse.png'))))
self.setFixedWidth(200)
self.setFixedHeight(200)
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = GUI(app)
ex.show()
sys.exit(app.exec_( ))