Created GUI icon not showing when running file in PyCharm Follow
Hello,
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):
super().__init__()
self.initUI()
def initUI(self):
self.setGeometry(300, 300, 300, 220)
self.setWindowTitle('Icon')
self.setWindowIcon(QIcon('web.png'))
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
Please sign in to leave a comment.
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?