Is there any way to call flutter from qt?
-
I just asked yesterday about calling swift from qt using c++, but since it was off-topic this forum, I did not continue with the discussion. Today, I want to ask whether you can call Flutter/Dart from qt. Since this is related about qt itself, please reply me the method to do so.
-
Hi,
It's the same issue: Qt is a C++ framework. AFAIK Flutter is written in Dart so it seems you are asking for how to call Dart functions from C++.
If so you likely should be interested by the Dart embedding API. There's a community written example given here.
These two links comes from the Dart documentation.
Note, I haven't used Dart at all.
-
This has nothing to do with Qt.
If you want Flutter to make use of C/C++ code look here.
If you want your C/C++ code to call Flutter functionality then I think you are out of luck. Here describes the possibilities for Android (Kotlin) and IOS (Swift) host applications: no mention of any other bindings or platforms. -
I just asked yesterday about calling swift from qt using c++, but since it was off-topic this forum, I did not continue with the discussion. Today, I want to ask whether you can call Flutter/Dart from qt. Since this is related about qt itself, please reply me the method to do so.
@1km7kt1hi said in Is there any way to call flutter from qt?:
Since this is related about qt itself, please reply me the method to do so.
Same answer as yesterday, and further to my colleagues' replies above. There are no Qt "methods", or special support, for calling Swift, Flutter, Dart or any number of other languages or APIs you might mention. You can build your Qt applications from C++, in which case these come down to you finding "APIs" or "bindings" for these languages from C++.
The other possibility for Qt, which you might be interested in, is that you can use it from Python, via PySide (or PyQt). You get the same Qt functionality, doesn't matter whether you are in C++ or Python. But you may find some of the languages you want to "call" from your Qt application offer bindings, or easier interoperation, with Python instead of C++. It would then still be a question of looking up how to call/getting help from a non-Qt forum.