harbour-muchkin/qml/sailfish-python.qml

25 lines
750 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"){
2015-03-12 18:14:26 +00:00
py.addImportPath(Qt.resolvedUrl('../src/pyPackages/pillow-armv7hl'));
2015-02-21 14:19:19 +00:00
} else {
2015-04-06 23:18:17 +00:00
py.addImportPath(Qt.resolvedUrl('../src/pyPackages/pillow-i686'));
2015-02-21 14:19:19 +00:00
}
py.importModule('main',function(){
2016-01-29 17:21:43 +00:00
py.call("main.helloWorld",[])
2015-02-21 14:19:19 +00:00
pageStack.push(Qt.resolvedUrl("Main.qml"))
})
}
}
}