Qt: add validator to patch creator offset lineedit

This commit is contained in:
Megamouse 2023-07-10 00:55:27 +02:00
parent 083b4f0d3b
commit e8ee5831d3
9 changed files with 60 additions and 13 deletions

View file

@ -58,12 +58,12 @@ vfs_dialog_usb_input::vfs_dialog_usb_input(const QString& name, const cfg::devic
m_vid_edit = new QLineEdit;
m_vid_edit->setMaxLength(4);
m_vid_edit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-fA-F0-9]*$"))); // HEX only
m_vid_edit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-fA-F0-9]*$"), this)); // HEX only
m_vid_edit->setText(QString::fromStdString(info->vid));
m_pid_edit = new QLineEdit;
m_pid_edit->setMaxLength(4);
m_pid_edit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-fA-F0-9]*$"))); // HEX only
m_pid_edit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-fA-F0-9]*$"), this)); // HEX only
m_pid_edit->setText(QString::fromStdString(info->pid));
m_serial_edit = new QLineEdit;