You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qt Quick (QML) is actively developing and is used to create dynamic, animated interfaces.
Integration will allow using markers in QML applications, which will expand the library's audience.
Flexibility and customization
QML allows you to easily customize the appearance of markers (shapes, colors, animations) without recompiling C++ code.
You can create complex interactive markers (drag and drop, tooltips) using QML mechanisms.
Acceleration of development
QML simplifies the layout and layout of graphs with markers, reducing the amount of boilerplate code in C++.
The ability to declaratively describe markers directly in the QML scene.
Cross-platform
Qt Quick runs on mobile (Android/iOS), desktop (Windows, Linux, macOS) and embedded systems.
Better performance in dynamic scenes
Qt Quick uses hardware acceleration (OpenGL/Vulkan), which is useful for charts with many markers.
Disadvantages and difficulties:
Need to adapt the architecture
The original library is designed for QtCharts (C++), and Qt Quick requires QML wrappers and integration via QQuickItem or QSGNode.
There may be difficulties with synchronizing states between C++ and QML.
Qt Quick limitations in graphics
Qt Quick does not have built-in complex graphics tools (like QtCharts), so some logic will have to be rewritten.
Complex markers (e.g. with custom rendering) will require working with QQuickPaintedItem or QSGNode, which will complicate the code.
Performance with a large number of markers
If markers require frequent updates (e.g. real-time charts), QML binding can become a bottleneck.
Optimization via a C++ backend (e.g., via QAbstractSeries) will require additional efforts.
Duplication of functionality
Some QtCharts features (e.g., binding to axes) will have to be implemented from scratch in Qt Quick.
Increased support complexity
The library will have to support two backends (QtCharts and Qt Quick), which will increase the workload for developers.
Conclusion:
Integrating QPlotMarker with Qt Quick opens up new possibilities for use in modern QML applications, but requires significant architectural refinements. The optimal path may be gradual adaptation with the preservation of the C++ core and the addition of a QML interface.
Alternative approaches:
Create a QML wrapper around the existing C++ logic.
Develop a hybrid version, where the complex logic remains in C++, and the rendering is delegated to QML.
Use QtGraphicalEffects to customize markers in QML.
This integration will make the library more versatile, but will require careful design.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Advantages:
Support for modern UI frameworks
Qt Quick (QML) is actively developing and is used to create dynamic, animated interfaces.
Integration will allow using markers in QML applications, which will expand the library's audience.
Flexibility and customization
QML allows you to easily customize the appearance of markers (shapes, colors, animations) without recompiling C++ code.
You can create complex interactive markers (drag and drop, tooltips) using QML mechanisms.
Acceleration of development
QML simplifies the layout and layout of graphs with markers, reducing the amount of boilerplate code in C++.
The ability to declaratively describe markers directly in the QML scene.
Cross-platform
Qt Quick runs on mobile (Android/iOS), desktop (Windows, Linux, macOS) and embedded systems.
Better performance in dynamic scenes
Qt Quick uses hardware acceleration (OpenGL/Vulkan), which is useful for charts with many markers.
Disadvantages and difficulties:
Need to adapt the architecture
The original library is designed for QtCharts (C++), and Qt Quick requires QML wrappers and integration via QQuickItem or QSGNode.
There may be difficulties with synchronizing states between C++ and QML.
Qt Quick limitations in graphics
Qt Quick does not have built-in complex graphics tools (like QtCharts), so some logic will have to be rewritten.
Complex markers (e.g. with custom rendering) will require working with QQuickPaintedItem or QSGNode, which will complicate the code.
Performance with a large number of markers
If markers require frequent updates (e.g. real-time charts), QML binding can become a bottleneck.
Optimization via a C++ backend (e.g., via QAbstractSeries) will require additional efforts.
Duplication of functionality
Some QtCharts features (e.g., binding to axes) will have to be implemented from scratch in Qt Quick.
Increased support complexity
The library will have to support two backends (QtCharts and Qt Quick), which will increase the workload for developers.
Conclusion:
Integrating QPlotMarker with Qt Quick opens up new possibilities for use in modern QML applications, but requires significant architectural refinements. The optimal path may be gradual adaptation with the preservation of the C++ core and the addition of a QML interface.
Alternative approaches:
Create a QML wrapper around the existing C++ logic.
Develop a hybrid version, where the complex logic remains in C++, and the rendering is delegated to QML.
Use QtGraphicalEffects to customize markers in QML.
This integration will make the library more versatile, but will require careful design.
Beta Was this translation helpful? Give feedback.
All reactions