Created
June 14, 2016 14:28
-
-
Save YtvwlD/33504e43fe2c9259230152afdac22d7a to your computer and use it in GitHub Desktop.
pyotherside crash qqmlengine
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
unix:!android { | |
isEmpty(target.path) { | |
qnx { | |
target.path = /tmp/$${TARGET}/bin | |
} else { | |
target.path = /opt/$${TARGET}/bin | |
} | |
export(target.path) | |
} | |
INSTALLS += target | |
} | |
export(INSTALLS) |
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
def test(): | |
return ["Hello World!", 123] |
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
#include <QApplication> | |
#include <QQmlApplicationEngine> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication app(argc, argv); | |
QQmlApplicationEngine engine; | |
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); | |
return 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 2.3 | |
import QtQuick.Controls 1.2 | |
import io.thp.pyotherside 1.4 | |
ApplicationWindow { | |
visible: true | |
width: 640 | |
height: 480 | |
title: qsTr("Hello World") | |
Python { | |
Component.onCompleted: { | |
addImportPath(Qt.resolvedUrl(".")); | |
importModule("lib", function() { | |
call("lib.test", [], function(result) { | |
console.log("Result: " + result); | |
}); | |
}); | |
} | |
} | |
} |
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
<RCC> | |
<qresource prefix="/"> | |
<file>main.qml</file> | |
<file>lib.py</file> | |
</qresource> | |
</RCC> |
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
TEMPLATE = app | |
QT += qml quick widgets | |
SOURCES += main.cpp | |
RESOURCES += qml.qrc | |
# Additional import path used to resolve QML modules in Qt Creator's code model | |
QML_IMPORT_PATH = | |
# Default rules for deployment. | |
include(deployment.pri) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment