Answer the question
In order to leave comments, you need to log in
What is the best way to draw in QML?
Good day to all.
I decided to try QML for one of my personal projects and I had this question: what is the best way to draw graphic elements - inheriting from QQuickItem or using QML Canvas? Interested in features close to QGraphicsObject and QGrarphicsScene (collision tracking, coordinate changes, flags like movable, etc.).
I would also like to know if it is possible to use the HTML5 Canvas libraries for QML Canvas (as I understand it, this is the same thing)?
Answer the question
In order to leave comments, you need to log in
As for drawing, directly inheriting QQuickItem is not very convenient, you can look in the direction of QQuickPaintedItem . HTML5 Canvas seems to be almost the same, you can use other libraries, you just need to work on timers / events, etc. Here is an example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question