Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import PyQt5
- from PyQt5.QtGui import QFont
- from PyQt5.QtWidgets import *
- from PyQt5.QtWidgets import QMainWindow, QLineEdit, QPushButton
- class MainWindow(QMainWindow):
- def __init__(self):
- super().__init__()
- self.setWindowTitle("TaskManager")
- self.setGeometry(100, 100, 1200, 300)
- self.centralwidget = QWidget(self)
- self.setCentralWidget(self.centralwidget)
- self.layout = QHBoxLayout(self)
- self.centralwidget.setLayout(self.layout)
- self.setup_first()
- self.setup_second()
- self.setup_third()
- def setup_first(self):
- inner_layout = QVBoxLayout()
- self.layout.addLayout(inner_layout)
- inner_layout.setSpacing(1)
- self.title_input = QLineEdit("Введи заголовок", self)
- inner_layout.addWidget(self.title_input)
- self.desc_input = QLineEdit("Введи описание", self)
- inner_layout.addWidget(self.desc_input)
- self.imp_input = QLineEdit("Введи индекс важности", self)
- inner_layout.addWidget(self.imp_input)
- self.add_button = QPushButton("Добавить задачу", self)
- inner_layout.addWidget(self.add_button)
- def setup_second(self):
- self.show_button = QPushButton("Просмотреть\nзадачи", self)
- # self.show_button.setMinimumHeight(250)
- self.show_button.setFont(QFont("Arial", 18))
- self.layout.addWidget(self.show_button)
- def setup_third(self):
- inner_layout = QVBoxLayout(self)
- self.done_title_input = QLineEdit(self)
- # self.done_title_input.setMinimumHeight(25)
- self.done_title_input.setPlaceholderText("Введите заголовок задачи, которую хотите отметить как завершенную")
- self.done_button = QPushButton("Отметить", self)
- inner_layout.addWidget(self.done_title_input)
- inner_layout.addWidget(self.done_button)
- self.layout.addLayout(inner_layout)
- if __name__ == '__main__':
- app = QApplication(sys.argv)
- w = MainWindow()
- w.show()
- sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement