import sys
from PyQt4 import QtGui
class Example(QtGui.QWidget):
def __init__(self):
super(Example,self).__init__()
self.initUi()
def initUi(self):
self.setGeometry(10,10,300,300)
self.setWindowTitle('Windo ICON')
self.setWindowIcon(QtGui.QIcon('icon.png'))
self.show()
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
from PyQt4 import QtGui
class Example(QtGui.QWidget):
def __init__(self):
super(Example,self).__init__()
self.initUi()
def initUi(self):
self.setGeometry(10,10,300,300)
self.setWindowTitle('Windo ICON')
self.setWindowIcon(QtGui.QIcon('icon.png'))
self.show()
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
No comments:
Post a Comment