Start Linux Leave Linux a while Back to Linux
分类: LINUX
2018-01-22 11:42:05
带确认选择对话框:
void mainWindow::closeEvent(QCloseEvent * event) {
switch(QMessageBox::information(this, tr("CT Control View"), tr("Do you really want to log out CT Control View?"),
tr("Yes"), tr("No"), 0, 1 )) {
case 0:
event->accept();
break;
case 1:
default:
event->ignore();
break;
}
}