3 ms·
I wish all the effort to make Qt available in Python was going in to exposing a C API. I of course know this is difficult due to Qt relying on OO extensibility
by kodablah 8y ago
I wish all the effort to make Qt available in Python was going in to exposing a C API. I of course know this is difficult due to Qt relying on OO extensibility in many cases and I am aware of many efforts in many languages that just use the C++ API directly by essentially building their own C API layer.
That I have to choose between C++ or Python makes it very difficult for many use cases in other languages. What essentially ends up happening is you create the UI in C++ then build a communication/bridge layer with your Go/Rust/JVM/etc app via C and the respective language's FFI features.
- pknopf 8y agoI built a C-layer myself for use with C#. https://github.com/qmlnet/qmlnet https://github.com/qmlnet/qmlnet It worked out nicely.
- rhodysurf 8y agoYou can use rust https://github.com/KDE/rust-qt-binding-generator https://github.com/KDE/rust-qt-binding-generator There are Go bindings floating around too
- kodablah 8y agoSure, I am familiar with them all (there's another decent Rust cpp gen one too). That's what I was alluding to with "I am aware of many efforts in many languages that just use the C++ API directly by essentially building their own C API layer." Unfortunately each binding has to do this themselves because there's not a blessed C API.