- _toggleViewAction = new QAction(tr("Show search bar"), this);
- _toggleViewAction->setCheckable(true);
- _toggleViewAction->setChecked(false);
- connect(_toggleViewAction, SIGNAL(toggled(bool)),
- this, SLOT(setVisible(bool)));
- setVisible(false);
+ Action *hideSearchBar = coll->add<Action>("HideSearchBar", toggleSearchBar, SLOT(setChecked(bool))); // always false
+ hideSearchBar->setShortcut(Qt::Key_Escape);