Solved line edit only numbers with int64
-
hello
i want make a line edit only accept numbers , so i used :ui->barcode->setValidator(new QIntValidator(0, 999999999999, this));
but i keep getting convery from int64 to int 32
so how i can use int64 ? or use unsinged int -
You can't use int64 or unsigned int with QIntValidator. You'll need to create your own validator for that by subclassing QValidator and implementing
fixup()
andvalidate()
.