alegen

Untitled

Jun 7th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. from PyQt4.Qt import *
  2. import sys
  3.  
  4. class BaseClass(QObject):
  5.    
  6.     def __init__(self):
  7.         super(BaseClass, self).__init__()
  8.         print 'BaseClass.__init__'
  9.  
  10.     @pyqtSlot()
  11.     def baseSlot(self):
  12.         print 'baseSlot called :)'
  13.  
  14. class MainWindow(QMainWindow, BaseClass):
  15.     def __init__(self, *args):
  16.         super(MainWindow, self).__init__(*args)
  17.         self.btn1 = QPushButton("Click me", self)
  18.         #self.btn1.clicked.connect(self.baseSlot)
  19.  
  20. class App(QApplication):
  21.     def __init__(self, *args):
  22.         super(App, self).__init__(*args)
  23.         self.main = MainWindow()
  24.         self.main.show()
  25.  
  26. app = App(sys.argv)
  27. app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment