Updated code to support newer Qt versions (#237)

This commit is contained in:
Vampire Cat 2021-04-04 11:09:23 +02:00 committed by GitHub
parent d1e47539fc
commit 34c8ad8dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 358 additions and 94 deletions

View file

@ -15,7 +15,11 @@
#include <QDebug>
HexSpinBox::HexSpinBox(QWidget *parent) :
#if QT_VERSION_MAJOR >= 6
QSpinBox(parent), validator(QRegularExpression("0x([0-9a-fA-F]){1,8}"))
#else
QSpinBox(parent), validator(QRegExp("0x([0-9a-fA-F]){1,8}"))
#endif
{
this->setRange(INT_MIN, INT_MAX);
this->setPrefix("0x");