viewMenu->addSeparator()->setText(tr("Toggle Central Viewers"));
viewMenu->addSeparator()->setText(tr("Toggle Central Viewers"));
// for(Viewer *v : viewers) {
// int i = 0;
// add a toggle action for each widget stacked inside the central widget
// // beware that getWidget(..) requires a parent and as the widget was setup inside centralWidget()
// // it was reparented to centralWidget() → use getWidget(centralWidget()) and not getWidget(this)
// // in order not to modify the central widget parenting
// while (i<qobject_cast<QStackedWidget*>(centralWidget())->count() && qobject_cast<QStackedWidget*>(centralWidget())->widget(i)!=v->getWidget(centralWidget()))
// i++;
// if (i<qobject_cast<QStackedWidget*>(centralWidget())->count()) {