Maybe look at how it's done in pyqtgraph to get ideas
Maybe look at how it's done in pyqtgraph to get ideas