void CPMainWindow::closeEvent(QCloseEvent * e)
{
CPTaskController *ptr = CPTaskController::get();
bool doingTask = ptr->witherDoneTask();
if (doingTask)
{
bool ret = CPMessageBox::question(this, tr("Is there a task to do, to turn off the software?"));
e->isAccepted();
if (ret) //如果按下确定键
e->accept(); //那我就确定退出
else
e->ignore(); // 如果按下选择见那么就忽略,继续执行
}
}
closeEvent窗口:忽略状态还是确定执行
最新推荐文章于 2024-01-27 13:52:42 发布