pyqt to draw a 100k point Dynamic graph, what controls should I use
时间: 2024-05-30 14:16:11 浏览: 128
As an AI language model, I don't have personal experience using PyQt, however, here are some suggestions:
1. Use a QGraphicsView to display the graph. This provides a scalable and efficient way to display large amounts of data.
2. Implement a custom QGraphicsItem to represent each point on the graph. This item can be optimized to only redraw when necessary to improve performance.
3. Use a QTimer to periodically update the graph with new data. This can be used to simulate a dynamic graph by adding new points over time.
4. Consider using a separate thread or process to handle the data processing and updating of the graph. This keeps the UI responsive and prevents it from freezing while processing large amounts of data.
阅读全文