Created
August 14, 2014 08:11
-
-
Save aoloe/145cb761131726344a18 to your computer and use it in GitHub Desktop.
pyqt and qqmlapplicationengine
This file contains 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
$ 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 |
This file contains 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 2.0 | |
import QtQuick.Controls 1.0 | |
AppplicationWindow { | |
id: root | |
width: 500 | |
height: 300 | |
title: "hey" | |
Button { | |
anchors.centerIn: parent | |
text: "Push me" | |
} | |
} |
This file contains 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
# -*- 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