Python: PyQT: Unterschied zwischen den Versionen
Flinh1 (Diskussion | Beiträge) |
Flinh1 (Diskussion | Beiträge) (→Allgemeines) |
||
Zeile 14: | Zeile 14: | ||
---- | ---- | ||
+ | == Beispiele == | ||
− | > | + | === Fenster anlegen === |
− | + | <nowiki> | |
+ | from PyQt5.QtWidgets import * | ||
+ | import sys | ||
+ | |||
+ | app = QApplication(sys.argv) | ||
+ | |||
+ | window = QWidget() | ||
+ | window.setGeometry(0,0,500,500) | ||
+ | window.setWindowTitle('First') | ||
+ | |||
+ | window.windowTitle() | ||
+ | |||
+ | window.show() | ||
+ | |||
+ | sys.exit(app.exec_()) | ||
+ | </nowiki> | ||
---- | ---- |
Version vom 23. November 2020, 17:11 Uhr
Inhaltsverzeichnis
Allgemeines
Download von https://sourceforge.net/projects/pyqt/
Beispiele
Fenster anlegen
from PyQt5.QtWidgets import * import sys app = QApplication(sys.argv) window = QWidget() window.setGeometry(0,0,500,500) window.setWindowTitle('First') window.windowTitle() window.show() sys.exit(app.exec_())
Quellen
- https://www.tutorialspoint.com/pyqt/pyqt_hello_world
| |