The first problem is that QLineEdit (or maybe QLocale) does auto spaces.
flags = 1048576;
ui->lineEditFlags->setText(convert.toString(flags));
flags = 1048576;
QLocale convert;
ui->lineEditFlags->setText(convert.toString(flags));
To copy to clipboard, switch view to plain text mode
And the result I get is:
1 048 576
1 048 576
To copy to clipboard, switch view to plain text mode
... with white spaces =/
The second problem is that:
ui->lineEditFlags->setValidator(validator);
QValidator *validator = new QIntValidator(this);
ui->lineEditFlags->setValidator(validator);
To copy to clipboard, switch view to plain text mode
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?
Bookmarks