Lebowski
7th June 2006, 11:03
I've created a form named startno. Inside I have a QLineEdit object named line. I would like to change text in this field by writing code into startno.ui.h.
If I use it inside a function (like after button click) it works ok. Working example:
void startno::changeso_clicked()
{
line->setText("test1");
}
If I try to write text to that field outside of any function I get an error. Non-working example:
line->setText("test1");
I know I can set this text in property editor. But I would like to find a solution for this for future :)
If I use it inside a function (like after button click) it works ok. Working example:
void startno::changeso_clicked()
{
line->setText("test1");
}
If I try to write text to that field outside of any function I get an error. Non-working example:
line->setText("test1");
I know I can set this text in property editor. But I would like to find a solution for this for future :)