I need to implement widget based on QToolButton that will allow display up to 4 icons on top of it. Icons will be moved, hidden, shown and changed. There will be many such widgets displayed at the same time and all of them will use same set of icons.
I am worried about performance in this case, because I expect operations of loading graphics, moving it and hiding to be slow. For some reasons function that will arrange icons according to some set of variables will be called many times. Values of these variables not necessarily will be changed between consecutive calls, but we don't want to keep a copy of set of values during previous call of this function.

I'm considering using 4 QLabels as containers for QPixmaps. I want to create static or global QPixmap variables, so I can create them once at start of application and use them to display icons simultanously on many such widgets. I have some questions related to this:

1. Is QLabel::setPixmap() optimised so it does not cause refreshment of window after loading same QPixmap? Or should I always compare previous QPixmap in this label with the new to set?
2. Are moving, hiding and displaying QLabels with QPixmaps slow operations? Should I check the position and visibility of QLabel to avoid situation, when I want to move QLabel to the current position or set visible already visible QLabel, to increase performance?