strange behaviour after spinbox click

Have a spinbox inside my userwidget, which is inside another widget. I have defined max, min values and the min desired size of the parent size box.
No problem with dragging the spinbox, but when i just click and release on it without dragging/changing value the total widget disappears. The spinbox never enters the text input mode, where the mouse cursor is blinking inside the box.
What remains is the left-right dragging icon as long as i don’t move the mouse.

I have no clue how to debug and catch this process because a spinbox has no “press” or “click” event to override.

Might have something to do with lost focus or parent widgets.

edit: found the solution. in my parent widget i constantly setvisibility of this child widget to collapsed.

edit: The same problem with input text boxes.