Labels

16/07/2009

Message box

(系统提示对话框)

switch(QMessageBox::warning(this, "Warning",
"Database file is opened,\n"
"please close it first.\n"
"Close database file?",
"Yes", "No", 0, 1)) {
case 0:
ui->label_temp->setText("yes");
db.close(); // close database
dbOpened = false;
openFile(); // open file dialog
showTable(curtTable);
break; // pay attention to here
case 1:
ui->label_temp->setText("no");
break; // and here

No comments:

Post a Comment