Use QRegExpValidator in AddressDialog
MODIFY
src/addressdialog.cpp
src/addressdialog.cpp
#include "ui_addressdialog.h"
#include <QPushButton>
+#include <QRegExpValidator>
+
+#include "radix.h"
AddressDialog::AddressDialog(QWidget* parent) : QDialog(parent), m_ui(new Ui::AddressDialog) {
m_ui->setupUi(this);
- // set input range
- m_ui->address->setInputMask("hhhhhhhh");
+ QRegExpValidator* validator = new QRegExpValidator(this);
+ validator->setRegExp(hexRegex32);
+ m_ui->address->setValidator(validator);
+ m_ui->address->setText("0x00000000");
setWindowTitle("Ripes");
- setWindowIcon(QIcon(":/icons/logo.svg"));
connect(m_ui->address, &QLineEdit::textChanged, this, &AddressDialog::validateTargetAddress);
}

MODIFY
src/addressdialog.ui
src/addressdialog.ui
<x>0</x>
<y>0</y>
<width>230</width>
- <height>96</height>
+ <height>101</height>
</rect>
</property>
<property name="windowTitle">
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>0x</string>
- </property>
- </widget>
- </item>
<item>
<widget class="QLineEdit" name="address"/>
</item>

Use QRegExpValidator in AddressDialog