Created
March 3, 2026 15:50
-
-
Save leon-anavi/e76c6ca5409796ab34d3f9e7bcc3d952 to your computer and use it in GitHub Desktop.
PyQt6 Hello World App
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 PyQt6.QtGui import QGuiApplication | |
| from PyQt6.QtQml import QQmlApplicationEngine | |
| app = QGuiApplication(sys.argv) | |
| engine = QQmlApplicationEngine() | |
| engine.quit.connect(app.quit) | |
| engine.load('main.qml') | |
| sys.exit(app.exec()) |
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 QtQuick | |
| import QtQuick.Controls | |
| ApplicationWindow { | |
| visible: true | |
| width: 600 | |
| height: 500 | |
| title: "HelloApp" | |
| Text { | |
| anchors.centerIn: parent | |
| text: "Hello World" | |
| font.pixelSize: 24 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment