Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Best way to build annotation control in QML
Forum Updated to NodeBB v4.3 + New Features

Best way to build annotation control in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 355 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eragon
    wrote on last edited by eragon
    #1

    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.

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      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.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved