Does anyone know how I can trigger the parent to resize when its child widget is resized?

What I have tried is that emit signal in the resizeevent of the child widget and do the slot of the parent widget to resize the parent.
But unfortunately resizing the parent will cause the child widget to be resized again. So in this way, I get a loop and it doesn't give
me the result that I expect.

Can somebody help with that?