Why wont this work? Its supposed to work like this: when “File” is clicked, a toolbar (not a menubar) shows right beneath the menubar with different buttons on it that would be found in a “File” menu, and when “Edit” is clicked the “File” toolbar is hidden and the “Edit” toolbar is shown.
menubar = new MyMenuBar(this);//this is a menubar with "file" and "edit"
menubar->setGeometry(0,0,1100,30);
ftoolbar = new MyFileToolBar(this); // this is a toolbar with buttons that would be
// found in a "file" menu
ftoolbar->setGeometry(0,30,1100,40);
ftoolbar->hide();
etoolbar = new MyEditToolBar(this); // this is a toolbar with buttons that would be
//found in an "edit" menu
etoolbar->setGeometry(0,30,1100,40);
etoolbar->hide();
//here down does not work
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()));
File

Edit
I made a bad assumption about what
triggered(QAction*)meant.I replaced
with