Are you reconstructing the path from scratch at every update?
For example Qt::WA_OpaquePaintEvent and Qt::WA_StaticContentsQWidget flags? Which ones?
Cache the background.I also found another CPU hog with my display code, as well. I have a nice looking linear gradient for background of the main instrument panel, using QLinearGradient, the parameters of which are set in the central widget resize() method. That's what our screen designer wanted.....
I found that no background reduced the CPU utilization dramatically - to about 10% on Linux when the overall instrument panel was maximized to full screen. That appears to be approaching QTimer overhead of the two timers I have. I'll see if i can use a static image instead for this and position it in the background according to the size of the overall instrument panel.







Reply With Quote

Bookmarks