For some code examples, see one of the Qt Graphs for 2D examples:
HelloGraphs
The following example shows how to use widgets to visualize data:
范例