Иконка окно на pyqt4

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/usr/bin/env python
#-*-coding:utf8-*-
#icon.py
#Created by jython
import sys
from PyQt4 import QtGui
class Icon(QtGui.QWidget):
def __init__(self,parent=None):
QtGui.QWidget.__init__(self,parent)
self.setGeometry(300,300,300,200)
self.setWindowTitle("Created by jython")
self.setWindowIcon(QtGui.QIcon("1.jpeg"))
app=QtGui.QApplication(sys.argv)
icon=Icon()
icon.show()
sys.exit(app.exec_())