I'm using a QTableView with a subclass of QItemDelegate to control the look and feel of the tableview's cells.
Each cell displays the name and status of a of an externally connected device, and as many as 100 devices may be connected at once.
The name and type of each device is essentially static, updating very rarely (perhaps once an hour), but each cell needs to display a real time value of the device's input, which I currently poll for every 50 milliseconds. This value is displayed as a basic bar graph drawn by the painter provided to the Delegate::paint() method by the TableView.
The problem with updating my model 20 times per second is that the entire table is redrawn each time, which is highly inefficient. Limiting the paint method to only drawing the bar graph shows that the majority of CPU time is dedicated to drawing the name, status and associated image on each cell, rather than the graph.
What I need to find is a way to update the graph for each cell regularly without redrawing the cell, but I can't work out how to do it.
What is the most efficient way of achieving this?
Edit: Image attached to help.
Image represents 10 sensors in a QTableView. The Number, Name and Status are virtually static, almost never updating. The bar graph next to the 'Sensor Value' text updates every 50ms. I only want to paint this bar, rather than the text, status and the cell background. The status lights and background are complex images, so take much more CPU time than simply drawing and filling a rect.