Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt4.Qt import *
- import sys
- class BaseClass(QObject):
- def __init__(self):
- super(BaseClass, self).__init__()
- print 'BaseClass.__init__'
- @pyqtSlot()
- def baseSlot(self):
- print 'baseSlot called :)'
- class MainWindow(QMainWindow, BaseClass):
- def __init__(self, *args):
- super(MainWindow, self).__init__(*args)
- self.btn1 = QPushButton("Click me", self)
- #self.btn1.clicked.connect(self.baseSlot)
- class App(QApplication):
- def __init__(self, *args):
- super(App, self).__init__(*args)
- self.main = MainWindow()
- self.main.show()
- app = App(sys.argv)
- app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment