qt七个按钮进行互斥
void Home::on_toolButton_setting_clicked()
{
set_head_unchecked(qobject_cast<QToolButton *>(sender()));
}
void Home::set_head_unchecked(QToolButton *tool_button)
{
ui->toolButton_home->setChecked(false);
ui->toolButton_setting->setChecked(false);
ui->toolButton_warning->setChecked(false);
ui->toolButton_net_info->setChecked(false);
ui->toolButton_play_back->setChecked(false);
ui->toolButton_play_video->setChecked(false);
ui->toolButton_fc_realtime->setChecked(false);
tool_button->setChecked(true);
if(tool_button->objectName()=="toolButton_home")
{
home_page_video->show();
}
else
{
home_page_video->hide();
}
}
原文地址:https://blog.csdn.net/sunflower_2020/article/details/142362750
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!