Pyside, declarative: Returning a value from a slot
Been playing with python/QML and slots returning values, but things dont seem to work well when you do something like:
self.r = 0
self.s = "heloo"
v = self.r + 10
and then in the QML :
@helloText.text = getstuffdone.val()@
the Value is always shows up 1
and it is same for returning strings. The returned string is empty.
and I also checked with the pyside examples and it does same issue (see example qmltopy2), the rotation does not pick up.
any idea how to make it work?
oo and in my main.py i aslo do :
if name == "main":
initiate the main QML application
app = QtGui.QApplication(sys.argv)
view = QtDeclarative.QDeclarativeView()
getstuffdone = Communicate()
timer = QtCore.QTimer()
context = view.rootContext()
hi adhorn, this was fixed on PySide git version. A new version with this and others bugs fixes will be released soon.