-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·42 lines (32 loc) · 950 Bytes
/
main.py
File metadata and controls
executable file
·42 lines (32 loc) · 950 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
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
import os
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu, QTabWidget
import terminal
import gui
class Main(QMainWindow):
def __init__(self, parent=None):
super(Main, self).__init__(parent)
self.setWindowTitle("blabla")
self.fileMenu = QMenu("&File", self)
self.menuBar().addMenu(self.fileMenu)
self.tabs = QTabWidget(self)
self.tabs.setDocumentMode(True)
self.tabs.setTabsClosable(True)
self.tabs.setMovable(True)
frame = gui.TerminalWidget(self)
self.tabs.addTab(frame, 'Terminal #1')
frame = gui.TerminalWidget(self)
self.tabs.addTab(frame, 'Terminal #2')
frame = gui.TerminalWidget(self)
self.tabs.addTab(frame, 'Terminal #3')
self.setCentralWidget(self.tabs)
self.show()
def sizeHint(self):
return QSize(800, 600)
if __name__ == "__main__":
app = QApplication(sys.argv)
main = Main()
app.exec_()