If i put anything else in place which i showed upper, it will be ok, but..
In fact, two menu options:
have these two signals defined:
void MainWindow::on_actionOptions_changed()
{
if(ui->actionOptions->isChecked()) // hiding or showing widgets by menu
ui->dockWidget_2->show();
else ui->dockWidget_2->hide();
}
void MainWindow::on_actionGraph_Options_changed()
{
if(ui->actionGraph_Options->isChecked()) // hiding or showing widgets by menu
ui->dockWidget->show();
else ui->dockWidget->hide();
}
void MainWindow::on_actionOptions_changed()
{
if(ui->actionOptions->isChecked()) // hiding or showing widgets by menu
ui->dockWidget_2->show();
else ui->dockWidget_2->hide();
}
void MainWindow::on_actionGraph_Options_changed()
{
if(ui->actionGraph_Options->isChecked()) // hiding or showing widgets by menu
ui->dockWidget->show();
else ui->dockWidget->hide();
}
To copy to clipboard, switch view to plain text mode
This two parts of code work like kind of feedback. They cooperate with each other, but on bad way. I want to have synchronization between check boxes in menu and displaying the widgets. I found sth on forum, but it does not look similar to my example.
Bookmarks