1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| import sys from PyQt6.QtWidgets import ( QApplication, Qwidget )
class EmptyWindow(QWidget): def __init__(self): super().__init__() self._initialize() def _initialize(self): self.setGeometry(位置x, 位置y, 大小x, 大小y) self.setWindowTitle("标题")
self.show()
if __name__ == '__main__': app = QApplication(sys.argv) window = EmptyWindow() sys.exit(app.exec())
|