How to set a window icon with PyQt5? : <pre><code>from PyQt5 import QtWidgets, QtGui
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *

class Application(QMainWindow):
    def __init__(self):
        super(Application, self).__init__()
        self.setWindowIcon(QtGui.QIcon('icon.png'))
</code></pre>

<p>I am trying to set a window icon (top left of the window) but the normal icon disappeared instead.</p>

<p>I tried with many icon resolutions (8x8, 16x16, 32x32, 64x64) and extensions (.png and .ico). </p>

<p>What am I doing wrong?</p>
