Skip to content

Instantly share code, notes, and snippets.

@leon-anavi
Created March 3, 2026 15:50
Show Gist options
  • Select an option

  • Save leon-anavi/e76c6ca5409796ab34d3f9e7bcc3d952 to your computer and use it in GitHub Desktop.

Select an option

Save leon-anavi/e76c6ca5409796ab34d3f9e7bcc3d952 to your computer and use it in GitHub Desktop.
PyQt6 Hello World App
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())
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