Unsolved Qpaint - Double Buffer
I am very new to QT. I have some requirements, please suggest how to implement it using QT.
My QT application will get commands and data to draw some rectangles, bitmap etc from an external application. After giving this commands, the external application will give an update command, I have to display the given items to screen on this update command.
This is a continuous process.So until receiving an update command, I can hide the drawn items and can make it visible on update command.
My problem is since this is a continuous process, after the first update command some other items also need to be drawn above the first shown screen like the same manner.
So how can I draw the new items individually over the previous screen and display complete screen on next update command?
Use QPixmap or QImage to draw offline. When the new update comes, draw on the same pix/QImage. Show this QPixMap/QImage in paintEvent(..).
You can find some inspiration in
(It paints on image)