Attached is a zip file with simple Qt application that creates a QMainWindow with a QSatusBar, and calls update() on the status bar 10 times per second.
The mac machine I am using is an absolute beast (see specs.png), and even on this machine the application steadily consumes about 20% CPU usage - which is absurd since it does practically nothing.
It seems the reason is because updating the status bar will trigger a repaint of the main window, which will result in the entire main window's image being copied in QImage::detach(). The reason we copy the image before we paint it is because somebody else holds a reference to the main window's image data (I suspect in libqcocoa.dylib).
Thus, we are copying the entire main window's image data every time a tiny widget is updated. Extrapolate that to a more complex application and it's obvious that things will be very uncomfortable.
I collected some profiling results (see profiling.png and pi.trace) that verify we spend a huge amount of time inside QImage::copy(), just by letting the app run idle for about a minute.
Is there something I am missing here? I could not find any similar bug reports, and it does not appear to be fixed with Qt 5.4.2.