Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt4 import QtGui,QtCore
- import sys
- class UI(QtGui.QWidget):
- def __init__(self,parent):
- super(UI,self).__init__()
- self.parent = parent
- self.initUI()
- def initUI(self):
- def initWidgets():
- return True
- self.setWindowTitle('HelloWorld');self.setToolTip('Hello World');self.setWindowIcon(QtGui.QIcon('Ressources/Images/football.png'));self.setGeometry(50,50,480,300);
- self.show()
- def customCode(self):
- print('OK')
- return True
- class HelloApp(QtGui.QApplication):
- def __init__(self,argv):
- super(HelloApp,self).__init__(argv)
- self.initAppFont()
- self.UI = UI(self)
- def initAppFont(self):
- fDB = QtGui.QFontDatabase()
- fDB.addApplicationFont('Ressources/Font/Dingbat.ttf')
- if __name__ == '__main__':
- HelloApp = HelloApp(sys.argv)
- sys.exit(HelloApp.exec_())
Advertisement
Add Comment
Please, Sign In to add comment