If you want to expose visual elements from C++ to QML you will end up subclassing QQuickItem anyway.
Whether you do that from your own application or from a plugin depends on the usecase, if you don’t need the components in other application, then just registering the components from within your application is way easier to manage. A plugin is just overhead in most cases.
There are also other ways to get complex 2D graphics to QML:
You could implement a custom QQuickImageProvider [qt-project.org] and expose graphs this way.
Also you can draw directly in QML using the QuickCanvas [qt-project.org].
↧








