Mar sin! I've got my 16.05 PRO5 here and I'd love to start throwing what are essentially PyQt5 Python programs at it. Not looking for perfection, just some basic functionality with a window appearing, buttons, that sort of jazz, lotsa nice Python happenings in the backgrounde. Now, much as I'd like pure Python, in the world of Ubuntu Touch I see the push towards QML and pyotherside, well ok.
So, I've been scurrying about trying to install pyotherside (version 1.4) and finding myself meddling with qmlscene (qmlscene: could not find a Qt installation of ''
blargh!). I'm happy to dive into proper QML but at this point would be happy with a simple Python "hello world" printout appearing in a window on an Ubuntu Touch device. Could someone guide me to completion on how to accomplish this?
qtchooser -list-versions
gives me the following:
4
5
qt4-arm-linux-gnueabihf
qt4
qt5-arm-linux-gnueabhif
qt5
I have a small program like this:
// hello.qml
import QtQuick 2.0
*import io.thp.pyotherside 1.4
Rectangle {
width: 640; height: 480
color: "#E95420"
Label { id: label; text: "Nothing here yet" }
MouseArea {
anchors.fill: parent
onClicked: {
py.addImportPath(Qt.resolvedUrl("."));
py.importModule("hello", function(){
label.text = call_sync("hello_world");
});
}
}
* Python { id: py }
}
# hello.py
def hello_world():
return "Hello from Python!"
When I run qmlscene hello.qml
(or similar) I get a bunch of Mir-related gibberish, excerpts of which are:
[QPA QMirClientClientIntegration: connection to Mir server failed.
Mir returned "Failed to connect: not accepted by server"
That sorta shite.
So, what've ya got for me, ma expert and extremely leet boos?