Skip to content

Instantly share code, notes, and snippets.

@amoh-godwin
Created March 12, 2022 16:30
Show Gist options
  • Save amoh-godwin/9f76d1c23b0f4a7cb27ac90a93f82303 to your computer and use it in GitHub Desktop.
Save amoh-godwin/9f76d1c23b0f4a7cb27ac90a93f82303 to your computer and use it in GitHub Desktop.
import sys
from PyQt6.QtGui import QGuiApplication
from PyQt6.QtQml import QQmlApplicationEngine
from PyQt6.QtQuick import QQuickWindow
from func import Converter
QQuickWindow.setSceneGraphBackend('software')
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
engine.load('UI/main.qml')
convert = Converter()
engine.rootObjects()[0].setProperty('converter', convert)
engine.quit.connect(app.quit)
sys.exit(app.exec())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment