#!/usr/bin/python2.5 import sys from PyQt4 import QtGui,QtCore from sms_ui import * class Awesome(QtGui.QMainWindow): def __init__(self, parent=None): #build parent user interface QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) QtCore.QObject.connect(self.ui.btnSend, QtCore.SIGNAL('clicked()'), self.smsgo) def smsgo(self): a=1 if __name__ == "__main__": #This function means this was run directly, not called from another python file. app = QtGui.QApplication(sys.argv) myapp = Awesome() myapp.show() sys.exit(app.exec_())
QtCore.QObject.connect(self.ui.btnSend, QtCore.SIGNAL('clicked()'), self.smsgo) def smsgo(self): a=1