Solved Modifying QResizeEvent
-
Is it possible to modify a resize event so that whenever a widget is resized I can add/remove a fixed amount from it?
-
@Qt_User72653 Subclass the widget class you need and override https://doc.qt.io/qt-5/qwidget.html#resizeEvent
But I'm not sure what will happen if you change the size inside this event filter.
Can you explain why you need this? -
I can't modify the event itself because it's read only, and calling resize() in the resizeEvent() results in infinite recursion.
I wanted to be able to resize a frameless window, and have that window automatically add the height of the title bar when the window's body is resized. I just ended up overwriting the resize() function to add it.