diff --git a/application/widgets/customcontrol/passwordinputdialog.cpp b/application/widgets/customcontrol/passwordinputdialog.cpp index 93a3eb1..4fbcc28 100644 --- a/application/widgets/customcontrol/passwordinputdialog.cpp +++ b/application/widgets/customcontrol/passwordinputdialog.cpp @@ -81,11 +81,11 @@ void PasswordInputDialog::initUi() // 限制中文和中文字符 #if QT_VERSION_MAJOR > 5 qCDebug(appLog) << "QT_VERSION_MAJOR > 5, setting regular expression validator"; - QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\/ ]+$"); + QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_+=<>,.\\/ -]+$"); QRegularExpressionValidator *regExpValidator = new QRegularExpressionValidator(regExp, this); #else qCDebug(appLog) << "QT_VERSION_MAJOR <= 5, setting regular expression validator"; - QRegExp regExp("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\/ ]+$"); + QRegExp regExp("^[A-Za-z0-9`~!@#$%^&*()_+=<>,.\\/ -]+$"); QRegExpValidator *regExpValidator = new QRegExpValidator(regExp, this); #endif