Importing C++ Visuals into QML
-
Hey,
I was wondering if it is possible to import C++ visuals into QML and how to instantiate them into QML to be seen. I understand how to transport Data such as variables between the C++ backend and QML visuals to an extent, but not enough to transport visuals. For example, if I wanted to create a graph using QtCharts in C++, how will I be able to get them to be seen in the UI?Thanks in Advance!
-
You can't get widgets displayed inside QML ui but you can do the opposite with http://doc.qt.io/qt-5/qquickwidget.html
Qt Charts have separate QML bindings: https://doc.qt.io/qt-5.11/qtcharts-qmlmodule.html
-
Hi,
Depending on what you want to do, KDAB's DeclarativeWidgets project might be of interest.
-
So to clarify, I can't get any C++ visual displayed in QML? So if I made something using the vtk library in a C++ backend, It couldn't get displayed? Thanks for everything so far by the way!
-
@GoldRatio said in Importing C++ Visuals into QML:
So if I made something using the vtk library in a C++ backend, It couldn't get displayed?