harbour-muchkin/qml/sailfish-python.qml

25 lines
741 B
QML
Raw Normal View History

2015-02-21 14:19:19 +00:00
import QtQuick 2.0
import Sailfish.Silica 1.0
import io.thp.pyotherside 1.3
ApplicationWindow {
id: root
cover: Qt.resolvedUrl("Cover.qml")
Python {
id: py
Component.onCompleted: {
py.addImportPath(Qt.resolvedUrl('../src'));
py.importModule_sync("os")
if (py.evaluate("os.uname().machine") == "armv7l"){
py.addImportPath(Qt.resolvedUrl('../src/pyPackages/pillowarmv7l'));
} else {
py.addImportPath(Qt.resolvedUrl('../src/pyPackages/pillowx86'));
}
py.importModule('main',function(){
py.call("helloworld",[])
pageStack.push(Qt.resolvedUrl("Main.qml"))
})
}
}
}