Best way to build annotation control in QML
-
Hi, I am attempting to create the below design in QML QQuickControls2 - its an annotation widget/control that will be displayed over images. What would be the best way to build this control?

For example;
- Should I create a
Panethat contains aLabeland someLinecontrol (does there exist such a control in QML?) to represent the lines. - Would it be easier to use a
QQuickPaintedIteminstead?
*Note: the annotation line length and angle will change. It depends on where the annotation sits inside the application window - if its close to the right border the annotation line will come out of the left side, etc.
- Should I create a
-
You need do to paint on your own for annotation. You can use QQuickPaintedItem for this purpose. You can simple QWidget and paintEvent(..) as well for the purpose of annotation.