How to bind QML_ELEMENT from C++ to Python using Shiboken?
-
Hello,
as we all know Python is not the best player with speed especially when it comes to multiple callbacks (that's where QML properties shine).Although the new QML integration with Python is more complete than ever, It still not a match for C++.
IMO Python is not a good choice to create elements in (at least for create-able elements), maybe only for prototypes.
For the past two weeks i have been struggling with creating bindings for qml elements written in C++ to Python.
I have read through the documentation, did the examples (that are somewhat trivial and not very helpful), Watched all Qt tutorials aboutShiboken
on YouTube but they were all more of a POC than a tutorial really, tried to copy and learn from open-source project like KDockWidget or pyqwt that did bindings to python from actual Qt libraries.
And couldn't bind even A plainQObject
derived class!It might be that I'm stupid but it would be great to have a more real world "simple-binding-example".
My try to bind QObject derived can be found here.