添加工具栏action(信号/消息)
actionStatusBar
actionToolBar
对action消息添加响应函数
消息响应函数定义(信号槽定义)
private slots:
void on_actionStatusBar_toggled(bool arg1);
void on_actionToolBar_toggled(bool arg1);
消息响应函数实体
void MainWindow::on_actionStatusBar_toggled(bool arg1)
{
if (arg1)
ui->statusbar->show();
else
ui->statusbar->hide();
}
void MainWindow::on_actionToolBar_toggled(bool arg1)
{
if (arg1)
ui->toolBar->show();
else
ui->toolBar->hide();
}