mr_kazoodle
22nd January 2011, 19:59
Hi,
When I run my program the default text displayed in the field is a zero with 6 spaces behind it instead of "0" (a zero without spaces behind it).(I didn't encounter any errors of any kind)
What do I need to do to get rid of those spaces?
QLineEdit *qleobject = new QLineEdit(this);
qleobject->setInputMask("0000000");
qleobject->setText("0");
qleobject->setAlignment(Qt::AlignRight);
http://img255.imageshack.us/img255/7128/screenshotvo.png (http://img255.imageshack.us/i/screenshotvo.png/)
Uploaded with ImageShack.us (http://imageshack.us)
When I run my program the default text displayed in the field is a zero with 6 spaces behind it instead of "0" (a zero without spaces behind it).(I didn't encounter any errors of any kind)
What do I need to do to get rid of those spaces?
QLineEdit *qleobject = new QLineEdit(this);
qleobject->setInputMask("0000000");
qleobject->setText("0");
qleobject->setAlignment(Qt::AlignRight);
http://img255.imageshack.us/img255/7128/screenshotvo.png (http://img255.imageshack.us/i/screenshotvo.png/)
Uploaded with ImageShack.us (http://imageshack.us)