Creating a custom-drawn component
I'm experimenting with Qt Quick to create a desktop application that does some audio processing. The audio processing will be implemented in C++, and I'd like to be able to update the drawing of the audio waveform in realtime as the user makes some adjustments.
The problem I have is that it's not clear what the recommended way is to create a user-drawn component. At first I thought I would create a subclass of QQuickPaintedItem, but the documentation for that class says it should only be used for porting older code. I guess I could use it anyway, but I'd prefer to use the "correct" approach.
If someone could point me towards an example that shows the recommended way of doing something like this, I would appreciate it. There may already be an example included with Qt 5.2, but I could use a pointer to the "best practice".
"Here is a good example that shows the basics":http://developer.nokia.com/community/wiki/CS001627_-_Creating_a_custom_QML_element_with_Qt
Edit: If you want Qt5, you will have to replace some "old" Qt4 objects with the new ones. But anyway, you have a starting point.
another one : "usage of dynamic graph":http://developer.nokia.com/community/wiki/QML_Performance_Meter
This one seems more close to what you want. I haven't tested it though, but seems worth looking at.
same remark here : it's based on Qt4's QDeclarativeView