Created GUI icon not showing when running file in PyCharm


I am going trough some Python examples of making a simple GUI. For some reason when I run the script from PyCharm it will not change the little application icon on the left that I set to web.pgn. I believe the code is alright. The writer of the tutorial suggests trying to set this option on: Settings/Settings Edidor select xfwm4. Find the show_app_icon

I cannot find this option under the editor settings of pycharm however. Am I missing something?

import sys
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtGui import QIcon

class Example(QWidget):

def __init__(self):


def initUI(self):
self.setGeometry(300, 300, 300, 220)

if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
1 comment
Comment actions Permalink

I had the same problem. If I run my code in "Terminal" window, it's ok, and the icons of the buttons in my GUI show up. But when I run the code in "Run" window by pressing "shift+F10",the icons are gone. Does anyone know what's going on here?


Please sign in to leave a comment.