Skip to content

Instantly share code, notes, and snippets.

@aoloe
Created August 14, 2014 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aoloe/145cb761131726344a18 to your computer and use it in GitHub Desktop.
Save aoloe/145cb761131726344a18 to your computer and use it in GitHub Desktop.
pyqt and qqmlapplicationengine
$ python3 test.py
QQmlApplicationEngine failed to load component
file:///home/ale/docs/src/scribus-script-repository/script-download/test/main.qml:4 AppplicationWindow is not a type
import QtQuick 2.0
import QtQuick.Controls 1.0
AppplicationWindow {
id: root
width: 500
height: 300
title: "hey"
Button {
anchors.centerIn: parent
text: "Push me"
}
}
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine("main.qml")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment