From 14b4fdd958c4df7e2cb72a88c30f6d250ed43a67 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 9 Sep 2017 11:02:46 +0100 Subject: Adding PyQt --- editor/tooltip.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 editor/tooltip.py (limited to 'editor/tooltip.py') diff --git a/editor/tooltip.py b/editor/tooltip.py new file mode 100644 index 00000000..57ed7a86 --- /dev/null +++ b/editor/tooltip.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import sys +from PyQt5.QtWidgets import QWidget, QPushButton, QApplication +from PyQt5.QtCore import QCoreApplication + + +class Example(QWidget): + + def __init__(self): + super().__init__() + self.initUI() + + def initUI(self): + qbtn = QPushButton("Quit", self) + qbtn.clicked.connect(QCoreApplication.instance().quit) + qbtn.resize(qbtn.sizeHint()) + qbtn.move(50, 50) + + self.setGeometry(300, 300, 250, 150) + self.setWindowTitle("Quit Button") + self.show() + + +if __name__ == "__main__": + app = QApplication(sys.argv) + ex = Example() + sys.exit(app.exec_()) -- cgit