模仿教程里
1 bool Ok;
2 QString text = QInputDialog::getText(NULL,tr("输入对话框"),
3 tr("你的评论是:"),QLineEdit::Normal,
4 tr("请输入:"),&OK);
5 if(OK)
6 {
7 QMessageBox::information(NULL,tr("标题"),
8 tr("你的评论是: <b>") + text + "</b>",
9 QMessageBox::Yes | QMessageBox::No,
10 QMessageBox::Yes);
11 }
编译时出现:
一个警告:1 bool OK; 未使用的变量
一个错误:4 'OK' was not declared in this scope
麻烦前辈们指点一下。。。