Open MRZA-MRZA opened 8 years ago
I made a simple app for SailfishOS using pyotherside and it worked, but then I tried to run (after writing new qml) it on desktop (Linux) it crashed. So I wrote test code that also crashed. My QML code:
import QtQuick 2.3 import QtQuick.Window 2.2 import io.thp.pyotherside 1.4 import QtQuick.Controls 1.4 Window{ visible: true Button{ id: button text: "Test" onClicked:{ python.test(); } } Python{ id: python onError: console.log('Error: ' + traceback) onReceived: console.log('Event: ' + data) Component.onCompleted:{ addImportPath(Qt.resolvedUrl(".")); importModule("mytest", function(){}); } function test(){ call("mytest.testFunc", function(){}) } } }
Python code:
import pyotherside def testFunc(): pyotherside.send("testevent", "test")
When I press the button application crashes. Tested on Ubuntu 16.04 and Debian. Here is full sources for Qt Creator https://www.dropbox.com/s/3kq5wolaqtxxb4n/TestApp.tar.xz?dl=0 Python 3.5.1+ Qt 5.5.1
I made a simple app for SailfishOS using pyotherside and it worked, but then I tried to run (after writing new qml) it on desktop (Linux) it crashed. So I wrote test code that also crashed. My QML code:
Python code:
When I press the button application crashes. Tested on Ubuntu 16.04 and Debian. Here is full sources for Qt Creator https://www.dropbox.com/s/3kq5wolaqtxxb4n/TestApp.tar.xz?dl=0 Python 3.5.1+ Qt 5.5.1