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?

    alt text

    For example;

    • Should I create a Pane that contains a Label and some Line control (does there exist such a control in QML?) to represent the lines.
    • Would it be easier to use a QQuickPaintedItem instead?

    *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.

  • Qt Champions 2017

    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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.