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. Drawing irregular shapes
Forum Updated to NodeBB v4.3 + New Features

Drawing irregular shapes

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • L Offline
    L Offline
    LonniB
    wrote on last edited by
    #1

    Hi everyone,
    Facing kind of an issue with QML at the moment. I would like to be able to draw a colored fragmented disk. The idea is that the number of fragment can be changed from one execution to an other and that as time goes by the color of each fragment is going to change. It is basically a visual representation of a timer.
    Though I do know that I can draw a disk with a rectangle + radius property and an inner smaller rectangler with that same radius property I have to admit I have no idea on to how to do this.
    Any suggestions?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gennon
      wrote on last edited by
      #2

      Hi,

      You could try to do it in QML using a Canvas and http://qt-project.org/doc/qt-5/qml-qtquick-context2d.html#arc-method.

      I did it in C++ once and it worked out well, but the Canvas should work just as well.

      /Gen

      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