How i import python file to qml.
-
@turkey You can't import Python code into QML. QML is not Python
Check https://doc.qt.io/qtforpython/tutorials/qmlapp/qmlapplication.html -
@turkey said in How i import python file to qml.:
i dont want import python code. i want to import python file. like js. for example we can add any js file as "import abcdef.js as Abcds" format like this. but im asking for .py file how ?
A
.js
is JavaScript, so it is possible to be included in QML, which is based on JavaScript engine.
A.py
is Python code, this is not possible to import in QMLyou can NOT import any
.py
in QML. I don't know why you want to do it, but you have to found another way. -
@KroMignon thank you for full of information answer. i want to do speech recognition in qml. There is no such feature directly in qml. Voice recognition can be done with python. I thought that if I could recognize voice with python and send data to qml, the problem would be solved.
-