title: why using PyQt5 on mac can not add a icon?
body: <pre><code>import sys
  import os
  from PyQt5.QtWidgets import QApplication, QWidget
  from PyQt5.QtGui import QIcon
  
  class Example(QWidget):
      def __init__(self):
          super().__init__()
          self.initUI()
  
      def initUI(self):
          self.setGeometry(300,300,300,220)
          self.setWindowTitle('Icon')
  
          path = os.path.join(os.path.dirname(sys.modules[__name__].__file__), 'icon_1.png')
          self.setWindowIcon(QIcon(path))
  
          self.show()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = Example()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>I also use a relative path like
  <code>self.setWindowIcon(QIcon('icon_1.png'))</code>
  I am sure icon_1.png is at the directory.But the result is always like that:</p>
  
  <p><a href="https://i.stack.imgur.com/7kGsf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7kGsf.png" alt="with no icon in the window and Dock"></a></p>
  
  <p>So where did I make some wrong? I am a newbie in both PyQt and StackOverflow and English... Hope the post is valid.</p>
  
  <p>Thank you in advance.</p>