Realtime pixel drawing in Qt
c++, qt
Solution
You can simply, directly, modify the bottom row of QPixmaps and `update()` the window (if the bottom row is in range).
You might find using a QImage is more efficient for half-baked rows, depending on how quickly you update/repaint.
Problem
My app display a long scientific vertically-scrollable picture (1024 x 99999999... px) as a sequence of `QPixmap` 1024x128 blocks. This allows me to scroll a picture with minimal CPU-cost by picking needed blocks from a table: `block_id = y_coord/128`. Also, `QPixmap` is preferred "pixel container" for fast screen output. But now I have a stream of new data coming to the application and need the new data to be added and displayed at the bottom of the long picture. Minimal portion: `1024x1` (a line). Also, I would like to display each new line as soon as possible (close to real-time). Each new portion of 128 lines will be "packed" to `QPixmap`, but until I received enough data I cannot build a whole block. What approach should I consider for displaying the new data? This video gives an idea of "adding new lines of data", except in my case the flow goes up: http://www.youtube.com/watch?v=Dy3zyQNK7jM