I did as you've said but it didn't work I don't know why.
I can add vertical separators in the tool bar but not horizontal ones in the menu.
here is what I did in the function that creates he menus :
void MainWindow::createMenus()
{
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(newAct);
fileMenu->addAction(openAct);
fileMenu->addAction(saveAct);
fileMenu->addAction(saveAsAct);
fileMenu->addAction(solveAct);
fileMenu->addSeparator();
fileMenu->addAction(quitAct);
editMenu = menuBar()->addMenu(tr("&Edit"));
editMenu->addAction(undoAct);
editMenu->addAction(redoAct);
editMenu->addSeparator();
editMenu->addAction(cutAct);
editMenu->addAction(copyAct);
editMenu->addAction(pasteAct);
editMenu->addSeparator();
editMenu->addAction(selectAllAct);
menuBar()->addSeparator();
viewMenu = menuBar()->addMenu(tr("&View"));
viewMenu->addAction(displayEditorAct);
viewMenu->addAction(displayResultAct);
helpMenu = menuBar()->addMenu(tr("&Help"));
}
void MainWindow::createMenus()
{
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(newAct);
fileMenu->addAction(openAct);
fileMenu->addAction(saveAct);
fileMenu->addAction(saveAsAct);
fileMenu->addAction(solveAct);
fileMenu->addSeparator();
fileMenu->addAction(quitAct);
editMenu = menuBar()->addMenu(tr("&Edit"));
editMenu->addAction(undoAct);
editMenu->addAction(redoAct);
editMenu->addSeparator();
editMenu->addAction(cutAct);
editMenu->addAction(copyAct);
editMenu->addAction(pasteAct);
editMenu->addSeparator();
editMenu->addAction(selectAllAct);
menuBar()->addSeparator();
viewMenu = menuBar()->addMenu(tr("&View"));
viewMenu->addAction(displayEditorAct);
viewMenu->addAction(displayResultAct);
helpMenu = menuBar()->addMenu(tr("&Help"));
}
To copy to clipboard, switch view to plain text mode
thanks in advance for your help.
Bookmarks