Okay sounds good.
Is it a good idea to do the sinus wave with canvas and plot it pixel by pixel or is there a better way to do that in QML?
Okay sounds good.
Is it a good idea to do the sinus wave with canvas and plot it pixel by pixel or is there a better way to do that in QML?
Well... it depends on your skills. You can use the canvas, you can subclass QQuickPaintedItem and paint using QPainter or you can subclass QQuickItem and implement it using scene graph primitives.
My skills? Very little. But looking at the options I think I have to go with canvas because these are all the libraries I am allowed to use:
- libQt5Core.so.5
- libQt5Quick.so.5
- libQt5Qml.so.5
- libQt5Network.so.5
- libQt5Gui.so.5
The libraries don't matter. All of the approaches I mentioned make use of the same set of libraries. If you have little skills then stay away from approach 3.
Thanks for the advise.
I think I found exactly what I need to get a nice visualisation: G Force Sensor
If you take out the shadow effect and the simulation values, it is like ten lines of code to do that. How is this possible? I have been reeding though the code a couple of times know but I just do not understand how this is done. Why are the bars moving from right to left? How are new bars added?
It's using a recursive shader, as far as I remember. Contents of the previous frame is kept, shifted and redrawn the next frame together with the latest data.
Yes, your are right. So it says in the blog post where I found it. But I do not understand the code. Where is this shift done?
If I understand this right, I can use the two files as they are, put the QUItMeterComponent in my QML file and update the meter.value with each increment?
Bookmarks