[Interest] What is the "right" way to make a cpu monitor like animation in QML?
markg85 at gmail.com
Mon Jun 3 00:53:02 CEST 2013
On Sun, Jun 2, 2013 at 11:07 PM, Mark <markg85 at gmail.com> wrote:
> I want to make a CPU monitor like component. At first i was
> considering using QML Canvas because it has everything i need to make
> a CPU monitor like component. Those requirements are:
> - Draw a line
> - Everything till that line should be drawn in a semi transparent color
> For a static image that works just fine. However, i want to animate
> things and that's not really the job of a canvas element. It doesn't
> look like it should be used for animation (not in QML nor in HTML5).
> That made me wonder, how are we supposed to make something like a cpu
> monitor with animations in QML?
Hmm, i will just answer myself since i found the solution. It's my
guess that i have to create a new component for this. Using QPainter
would be the easiest way, but using the QSG* classes is probably the
right way. I found a nice tutorial here:
(which is btw heavily broken.. luckily the example files do still
work). So i'm going down that route and see how that turns out.
Btw, there is also this library: https://gitorious.org/qmlplot/qmlplot
but it's not for Qt5/QtQuick 2.
This is for Qt5 and SceneGraph but fails to compile:
I'm trying to get the sources from that last link to work.
More information about the Interest