Guest User

Untitled

a guest
Sep 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. from PyQt4 import QtGui, QtCore
  4.  
  5. import sys, time
  6.  
  7. class CustomWidget(QtGui.QWidget):
  8.    
  9.     def __init__(self):
  10.         super(CustomWidget, self).__init__()
  11.  
  12.  
  13.     def start(self):
  14.         for i in range(0, 10000):      
  15.             print "hello %d" % i
  16.  
  17.     def showEvent(self, showEvent):
  18.         #print showEvent
  19.         self.start()
  20.  
  21. app = QtGui.QApplication(sys.argv)
  22.  
  23. w1 = CustomWidget()
  24. w1.show()
  25.  
  26. sys.exit(app.exec_())
Add Comment
Please, Sign In to add comment