From 80594d6e1a6f90dd3964497d66ffca54888a79d4 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 7 Aug 2018 23:20:55 -0500 Subject: Set toolbar widget names later to catch the problems and update widgets --- src/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d87bf0f0..2889876b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -257,9 +257,6 @@ MainWindow::MainWindow(QSettings &initSettings createHelpWidget(); for (QAction *action : ui->toolBar->actions()) { - // set the name of the widget to the name of the action to allow styling - ui->toolBar->widgetForAction(action)->setObjectName(action->objectName()); - if (action->isSeparator()) { // insert spacers ui->toolBar->insertWidget(action, spacer); @@ -444,6 +441,11 @@ MainWindow::MainWindow(QSettings &initSettings refreshExecutablesList(); updateToolBar(); + + for (QAction *action : ui->toolBar->actions()) { + // set the name of the widget to the name of the action to allow styling + ui->toolBar->widgetForAction(action)->setObjectName(action->objectName()); + } } -- cgit v1.3.1