import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget,QMessageBox
from untitled import Ui_MainWindow

class Mywindows(QMainWindow, Ui_MainWindow):
    def __init__(self):
        super(Mywindows, self).__init__()
        self.setupUi(self)
        self.pushButton.clicked.connect(self.open)

    def open(self):
        QMessageBox.information(self,"123","welcome",QMessageBox.Yes)
if __name__ == '__main__':
    app = QApplication(sys.argv)
    MainWindow = Mywindows()
    MainWindow.show()
    sys.exit(app.exec_())