void MainWindow::do_file_SaveOrNot()
{
if(ui->textEdit->document()->isModified())
QMessageBox box;
box.setWindowTitle(tr("Alarm"));
box.setIcon(QMessageBox::Warning);
box.setText(curFile+tr("is not be saved,would you want to save it?"));
box.setStandardButtons(QMessageBox::Yes|QMessageBox::No);
if(box.exec()==QMessageBox::Yes)
{
do_file_Save();
}
运行提示‘box’was not declared in this
scope.我是菜鸟,求高手相助.
}