Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QGridLayout, QLabel
  2. import sys
  3.  
  4. class ColorConverter():
  5.  
  6. @staticmethod
  7. def rgb_to_cmyk(self, rgb):
  8. pass
  9.  
  10. class MainWindow(QWidget):
  11. def __init__(self, parent=None):
  12. super().__init__(parent)
  13.  
  14. self.interface()
  15.  
  16. def interface(self):
  17. lfsr_btn = QPushButton("&LFSR", self)
  18. exit_btn = QPushButton("&Wyjście", self)
  19.  
  20. # lfsr_btn.clicked.connect(self.start_lfsr)
  21.  
  22. box_layout = QVBoxLayout()
  23.  
  24. box_layout.addWidget(lfsr_btn)
  25. box_layout.addWidget(exit_btn)
  26.  
  27. grid_layout = QGridLayout()
  28. grid_layout.addWidget(QLabel("Wybierz, co chcesz uczynić", self), 0, 0)
  29. grid_layout.addLayout(box_layout, 1, 0)
  30.  
  31. self.setLayout(grid_layout)
  32.  
  33. self.setGeometry(20, 20, 500, 300)
  34. self.setWindowTitle("Generatory")
  35.  
  36. def main():
  37. app = QApplication(sys.argv)
  38. window = MainWindow()
  39. window.show()
  40. # input()
  41. sys.exit(app.exec_())
  42.  
  43.  
  44. if __name__ == '__main__':
  45. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement