RSX
24th June 2009, 14:33
The first problem is that QLineEdit (or maybe QLocale) does auto spaces.
flags = 1048576;
QLocale convert;
ui->lineEditFlags->setText(convert.toString(flags));
And the result I get is:
1 048 576
... with white spaces =/
The second problem is that:
QValidator *validator = new QIntValidator(this);
ui->lineEditFlags->setValidator(validator);
It works fine until my program sets text to something like 1 048 576 (something that has whitespace). Then I can enter any character I want =/
Any way to fix these?
flags = 1048576;
QLocale convert;
ui->lineEditFlags->setText(convert.toString(flags));
And the result I get is:
1 048 576
... with white spaces =/
The second problem is that:
QValidator *validator = new QIntValidator(this);
ui->lineEditFlags->setValidator(validator);
It works fine until my program sets text to something like 1 048 576 (something that has whitespace). Then I can enter any character I want =/
Any way to fix these?