python - Window icon does not show -
i study tutorial http://zetcode.com/gui/pyqt5/firstprograms/ , code here.
import sys pyqt5.qtwidgets import qapplication, qwidget 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_())
can show window icon? use pyqt5, python3.4 , linuxmint 17.2 cinnamon.
i not sure, expected: windowicon
shown applicationicon
(e.g. here on ubuntu gnome, see code in background)
if no icon has been set, windowicon() returns application icon
(qapplication::windowicon()).
http://doc.qt.io/qt-5/qwidget.html#windowicon-prop
looks on ubuntu this:
so think, code working correctly
Comments
Post a Comment