Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt4.QtCore import *
- from PyQt4.QtGui import *
- class gui(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.button = QPushButton(self)
- self.button.setText('click')
- self.button.setObjectName('button1')
- self.show()
- QMetaObject.connectSlotsByName(self)
- def on_button1_clicked(self):
- print 'Clicked'
- def main():
- app = QApplication([])
- a = gui()
- app.exec_()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement