Use the overloaded function, addToolBar(const QString &title) to create a QToolBar object, setting its window title, and inserts it into the toolbar area.
Unified · Split
| @@ -1432,9 +1432,6 @@ ConfigMainWindow::ConfigMainWindow(void) · 1431 unmodified lines | |||
| 1432 | setTabOrder(configList, helpText); | 1432 | setTabOrder(configList, helpText); |
| 1433 | configList->setFocus(); | 1433 | configList->setFocus(); |
| 1434 | 1434 | ||
| 1435 | QToolBar *toolBar = new QToolBar("Tools", this); | ||
| 1436 | addToolBar(toolBar); | ||
| 1437 | |||
| 1438 | backAction = new QAction(QPixmap(xpm_back), "Back", this); | 1435 | backAction = new QAction(QPixmap(xpm_back), "Back", this); |
| 1439 | connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); | 1436 | connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); |
| 1440 | 1437 | ||
| @@ -1507,6 +1504,7 @@ ConfigMainWindow::ConfigMainWindow(void) · 66 unmodified lines | |||
| 1507 | connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); | 1504 | connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); |
| 1508 | 1505 | ||
| 1509 | // init tool bar | 1506 | // init tool bar |
| 1507 | QToolBar *toolBar = addToolBar("Tools"); | ||
| 1510 | toolBar->addAction(backAction); | 1508 | toolBar->addAction(backAction); |
| 1511 | toolBar->addSeparator(); | 1509 | toolBar->addSeparator(); |
| 1512 | toolBar->addAction(loadAction); | 1510 | toolBar->addAction(loadAction); |