qt设置简单的对话框 QInputDialog::getText();
qt 对话框 用户输入密码,对密码进行判断
bool isOK;
QString text = QInputDialog::getText(NULL, "Input Dialog","Please input your password",QLineEdit::Normal,"",//输入框的提示&isOK);
if(isOK) {std::string strpassword = text.toStdString();if(strpassword=="password"){ReadAndWrite( path, IntOffsetx1, IntOffsety2, IntOffsetx2, IntOffsety2,IntAngelOffset);QMessageBox::information(NULL,"提示","修改成功");}else{QMessageBox::information(NULL,"提示","密码错误");}
}
效果图: