Drawing irregular shapes



  • 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?



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


Log in to reply
 

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