Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. def window():
  2. app = QApplication(sys.argv)
  3. widget = QWidget()
  4.  
  5. button1 = QPushButton(widget)
  6. button1.setText("Запустить")
  7. button1.move(64, 32)
  8. button1.clicked.connect(button1_clicked)
  9.  
  10. button2 = QPushButton(widget)
  11. button2.setText("Выйти")
  12. button2.move(64, 64)
  13. button2.clicked.connect(button2_clicked)
  14.  
  15. global label1
  16. label1 = QLabel(widget)
  17. label1.setText("Программа не запущена")
  18. label1.move(150,150)
  19.  
  20. global label2
  21. label2 = QLineEdit(widget)
  22. label2.move(300,100)
  23.  
  24. widget.setGeometry(450, 250, 800, 600)
  25. widget.setWindowTitle("PyQt5 Button Click Example")
  26. widget.show()
  27. sys.exit(app.exec_())
  28.  
  29.  
  30. def button1_clicked():
  31. label1.setText("программа запущена")
  32. vk = autorize()
  33. sort_cities_list, sort_population_list = sort_cities_dict(cities_list(users_list(create_groups_list())))
  34.  
  35. def button2_clicked():
  36. exit()
  37.  
  38. if __name__ == '__main__':
  39. window()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement