+ // to avoid blinking caused by QMenu paint event (paints on top of the list)
+ myHistoryList->repaint();
+}
+
+void hideUpToMenuBar( QMenu* theMenu )
+{
+ theMenu->hide();
+ foreach( QWidget* aWidget, theMenu->menuAction()->associatedWidgets() )
+ {
+ QMenu* aMenu = qobject_cast<QMenu*>( aWidget );
+ if( aMenu )
+ {
+ aMenu->hide();
+ hideUpToMenuBar( aMenu );
+ }
+ }