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.

this window

i not sure, expected: windowicon shown applicationicon (e.g. here on ubuntu gnome, see code in background)

enter image description here

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:

enter image description here

so think, code working correctly


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -