Me again

I`m just trying to find out if this is a bug or not

Ok, here it goes:

I have QPushButtons on a QFrame and a stylesheet for the buttons for the normal state and the :hover state, the last adding a border-image to the button.
Qt Code:
  1. image: url(:/images/userLocation.png);
  2. image-position: center center;
  3. border-image: url();
  4. }
  5. QPushButton:hover {
  6. border-image: url(:/images/button_active.png);
  7. }
To copy to clipboard, switch view to plain text mode 

All goes well untill I add a popup as a CustomContextMenu to the buttons, called with the customContextMenuRequested( const QPoint & ) signal.

When the popup is called, it shows correctly but if I right-click on another one of these buttons, the popup goes away as it should, the second button gets hovered and the border-image is applied to it, but the first button never gets to unset it's border-image, and come back to it's display it should have when not hovered.
In other words, i end up with two hovered-looking buttons.

If I repeat the process and right click on the QFrame this time, it's the same thing, they both remain hovered, menu is gone.

If I leave the QFrame with the mouse, the buttons get reset and go back to their normal look.

After trying different approaches I tried giving the QPushButton that requested a context menu a repaint right when the popup is aboutToHide().

It worked! Now when the popup hides, the old right-clicked QPushButton looks normal.

Is this normal? Shouldn't this repaint get called automatically? That would sound logical to me.

P.S.: I use a QPushButton* to remember which button requested a context menu, maybe qt doesn't and there for, does not know where to call repaint?

Cheers!