Try like this...
create a pointer to form2 in form1 class. allocate memory in constructor.
inside button_on_click slot
call pointer->show();
Try like this...
create a pointer to form2 in form1 class. allocate memory in constructor.
inside button_on_click slot
call pointer->show();
It works. I also found out the I did a mistake. there is no on clicked events.
Anway I am one more doubt on multiple forms. How can I pass variables of one forms to another.
ie form 1->label 1->text (lbl1) to form 2's->QString str
I have the same problem.
Have you found the way to access to form1 variables from form2?
To pass a variable you should create a public pointer of the same tipe as the widget from the form you want to get the data from, and, in the constructor of the class you initialize them to the ui element.
Bookmarks