Created
July 17, 2017 09:35
-
-
Save apatrushev/d4006d616d66502d55ab4402f04055ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import ( | |
QApplication, | |
QMainWindow, | |
QPlainTextEdit, | |
QVBoxLayout, | |
QWidget | |
) | |
class MainWindow(QMainWindow): | |
def __init__(self): | |
super().__init__() | |
self.resize(320, 240) | |
self.setWindowTitle('Qute Text Editor') | |
self.setCentralWidget(QWidget()) | |
self.centralWidget().setLayout(QVBoxLayout()) | |
self.editor = QPlainTextEdit(self.centralWidget()) | |
self.centralWidget().layout().addWidget(self.editor) | |
def app_main(args): | |
app = QApplication(sys.argv) | |
win = MainWindow() | |
win.show() | |
return app.exec_() | |
if __name__ == '__main__': | |
sys.exit(app_main(sys.argv)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment