How do you intend to show the widgets after they are hidden ?
You can implement auto-hide with either mouseMoveEvent or focusOutEvent...

To show the widget back, you can use mouseMoveEvent in the main class..