I got it. It worked without a problem, in combination with the reimplementation of ::hideEvent() as well.

Thank you.