Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. import sys
  2. from PyQt5 import QtWidgets
  3. from PyQt5.QtWidgets import QMainWindow
  4. from PyQt5.QtWidgets import QPushButton
  5. from PyQt5.QtWidgets import QMessageBox
  6.  
  7.  
  8. class MainWindow(QMainWindow):
  9.     def __init__(self):
  10.         QMainWindow.__init__(self)
  11.         pybutton = QPushButton('йух', self)
  12.         pybutton.clicked.connect(self.clickMethod)
  13.  
  14.     def clickMethod(self):
  15.         QMessageBox.about(self, "Title", "Хуй")
  16.  
  17.  
  18. if __name__ == "__main__":
  19.     app = QtWidgets.QApplication(sys.argv)
  20.     mainWin = MainWindow()
  21.     mainWin.show()
  22.     sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement