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:
Code:
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:
Code:
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 :)