I want to create a widget that, when hovered, expands without taking up any extra space in the layout it is in - i.e. I want it to expand over the other widgets.
This widget will contain other widgets (just a text label, with rich text).
When not hovered, the widget takes up a fixed amount of space, clipping the text.
I figured I'd implement this by having one fixed-height widget actually in the layout, with the "over" widget always positioned relative to the fixed-height widget.
When hovered (enterEvent()), the "over" widget will grow, and when unhovered (leaveEvent()), the "over" widget would shrink back to normal size.
However, I'm having difficulty implementing this. I can't figure out what kind of window flags should be passed to it.
I've tried Qt::SubWindow, Popup, Window, Tool, and Widget.
What window flag should I use?
(I'm using Qt 5.5)
Bookmarks