dberube4

GADI-First Generated script

Nov 9th, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. from PyQt4 import QtGui,QtCore
  2. import sys
  3.  
  4.  
  5. class UI(QtGui.QWidget):
  6.  
  7.     def __init__(self,parent):
  8.         super(UI,self).__init__()
  9.         self.parent = parent
  10.         self.initUI()
  11.  
  12.     def initUI(self):
  13.         def initWidgets():
  14.             return True
  15.  
  16.         self.setWindowTitle('HelloWorld');self.setToolTip('Hello World');self.setWindowIcon(QtGui.QIcon('Ressources/Images/football.png'));self.setGeometry(50,50,480,300);
  17.         self.show()
  18.  
  19.     def customCode(self):
  20.         print('OK')
  21.         return True
  22.  
  23.  
  24. class HelloApp(QtGui.QApplication):
  25.  
  26.     def __init__(self,argv):
  27.         super(HelloApp,self).__init__(argv)
  28.         self.initAppFont()
  29.         self.UI = UI(self)
  30.        
  31.     def initAppFont(self):
  32.         fDB = QtGui.QFontDatabase()
  33.         fDB.addApplicationFont('Ressources/Font/Dingbat.ttf')
  34.  
  35.    
  36.  
  37.  
  38.  
  39. if __name__ == '__main__':
  40.   HelloApp = HelloApp(sys.argv)
  41.   sys.exit(HelloApp.exec_())
Advertisement
Add Comment
Please, Sign In to add comment