ui->edt_iceThick->setValidator(new QRegExpValidator(QRegExp("("")|(0)|(^0\.[0-9]{1,10}$)|(^[1-9][0-9]*[\.]?[0-9]+$){1,10}")));
void BladeBaseInformation::editingFinishedslot()
{
QLineEdit* lineEdit = qobject_cast<QLineEdit*>(sender());
if (lineEdit == nullptr)
{
return;
}
if (lineEdit->text().toDouble() < 1e-6)
{
if (returnOrPopWindow)
{
returnOrPopWindow = false;//避免二次弹窗
QMessageBox::information(nullptr, tr("Import Error"), tr("This LineEdit cannot be zero Or Null"), QMessageBox::Ok);
lineEdit->setFocus();
returnOrPopWindow = true;
}
}
}