source: ogBrowser-Git/qtermwidget/examples/pyqt/main.py @ 21e8f4c

jenkinsmain
Last change on this file since 21e8f4c was 64efc22, checked in by Vadim Troshchinskiy <vtroshchinskiy@…>, 19 months ago

Update qtermwidget to modern version

  • Property mode set to 100755
File size: 586 bytes
Line 
1#!/usr/bin/python3
2from PyQt5 import QtWidgets
3from QTermWidget import QTermWidget
4
5
6class Terminal(QTermWidget):
7    def __init__(self, process: str, args: list):
8        super().__init__(0)
9        self.finished.connect(self.close)
10        self.setTerminalSizeHint(False)
11        self.setColorScheme("DarkPastels")
12        self.setShellProgram(process)
13        self.setArgs(args)
14        self.startShellProgram()
15        self.show()
16
17
18if __name__ == "__main__":
19    app = QtWidgets.QApplication([])
20    args = ["--clean", "--noplugin"]
21    term = Terminal("vim", args)
22    app.exec()
Note: See TracBrowser for help on using the repository browser.