diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/tooltip.py | 28 |
1 files changed, 28 insertions, 0 deletions
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_()) |