There are two classes, let it be Form 1 and Form 2, which are created in Qt desinger. I want to tie them together. in the header file of Form 1 I connect the header of Form 2, I make the pointer Form2 *test; in the same form I create test = new Form2(); Everything works, now you can add a button and go to Form 2 or transfer any data from Form 1 to Form 2. BUT! If I want to connect Form 3 and add form 2 to the header and try to make a call to Form 2, I get an "incomprehensible type" error. Added additional class Form2; lines to header files class Form2; Everything compiles, but the program simply gives a critical error.
The scheme is this, if I move along the forms in one direction, then everything works.
1-> 2-> 3-> ..-> 10
If, I'm trying to move in different directions.
1-> 2-> 3-> 4-> 2 = Does not work.
1-> 2-> 3-> 1 = Does not work.
1-> 2-> 3-> 4-> 1 = Does not work.