#!/usr/bin/python import sys from PySide.QtGui import QMainWindow, QApplication from bouton_qt import Ui_MainWindow class MainWindow(QMainWindow, Ui_MainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setupUi(self) self.pushButton.clicked.connect(self.le_bouton) def le_bouton(self): print "bouton !" def main(): app = QApplication(sys.argv) try: frame = MainWindow() frame.show() app.exec_() finally: print "byebye" main()