Cant use ui on others functions
why that code didnt work?
how can i resolve this?
The mainwindow in pida::aha() is constructed in that method, you set the text and then it is destructed again, so it is never visible. It is most not the one you are actually showing in your main method.
You could try to pass the Mainwindow pointer into the method or turn the MainWindow into a singleton or store it in a global variable (not nice) and access that in your method.
yea, its work, but what i how i can do it when i want write it on class?
void aha(Ui::MainWindow* ok)
that isnt work