I would like to create a simple effect with my qt gui, but i have no idea how to achieve this.
I have several widgets, that i implemented as subclasses of qwidget. These are part of another widget and live in a layout. When the mouse hovers over these widgets, i want them to appear bigger to highlight the selected one.
This is what i already tried: Override the paint event, and simply paint it bigger. But then, the other widgets that also live in the same layout overpaint the oversized areas.
I also tried to call the paint function "by hand" from the parent window, to get control over the painting order. But that didnt help either.
I think there has to be a possibility achieving this effect this qt, but i simply dont know how. Any ideas?
raise()
ing the widget when you do that? – Matraise()
doesnt prevent the widget from being overpainted by the other widgets. If this helps: i want to have a similar effect to the auto hiding parts, like the solution explorer, of visual studio for example. – Valerieresize()
, but that's probably going to mess up your layout. You might manage to make it work with spacers. I don't know, and I don't like stuff moving under the mouse. Changing colors/highlighting is ok though. – Mat