Я сделал неверное предположение о том, что означает triggered(QAction*)
.
Я заменил
connect(menubar->File, SIGNAL(triggered(QAction*)), ftoolbar, SLOT(show()));
connect(menubar->File, SIGNAL(triggered(QAction*)), ftoolbar, SLOT(hide()));
connect(menubar->Edit, SIGNAL(triggered(QAction*)), etoolbar, SLOT(show()));
connect(menubar->Edit, SIGNAL(triggered(QAction*)), etoolbar, SLOT(hide()));
на
connect(menubar->File, SIGNAL(aboutToShow()), ftoolbar, SLOT(show()));
connect(menubar->File, SIGNAL(aboutToHide()), ftoolbar, SLOT(hide()));
connect(menubar->Edit, SIGNAL(aboutToShow()), etoolbar, SLOT(show()));
connect(menubar->Edit, SIGNAL(aboutToHide()), etoolbar, SLOT(hide()));