-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.py
More file actions
33 lines (22 loc) · 772 Bytes
/
window.py
File metadata and controls
33 lines (22 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow
from menu_bar import MenuBar
class Window(QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.setWindowTitle("Текстовый редактор")
self.setGeometry(750, 300, 500, 500)
self.text_edit = QtWidgets.QTextEdit(self)
self.setCentralWidget(self.text_edit)
self.cursor = self.text_edit.textCursor()
self.text_edit.setTextCursor(self.cursor)
self.menu_bar = MenuBar(self)
self.setMenuBar(self.menu_bar)
def application():
app = QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec_())
if __name__ == "__main__":
application()