Hello there! I am new to the forum, so just bear with me...
I am trying to open another form by clicking a button on the first form. I tried...
form1 w;
w.show();
form1 w;
w.show();
To copy to clipboard, switch view to plain text mode
And it shows form2 then immediately closes form2.
form1 w;
w->show();
form1 w;
w->show();
To copy to clipboard, switch view to plain text mode
Gives compiler error: "form1.cpp:84: error: base operand of '->' has non-pointer type 'form2'"
static Form2 *form2 = new Form2(this);
form2->show();
form2->activateWindow();
form2->raise();
static Form2 *form2 = new Form2(this);
form2->show();
form2->activateWindow();
form2->raise();
To copy to clipboard, switch view to plain text mode
gives compiler error: "form1.h:21: error: ISO C++ forbids declaration of 'Form2' with no type."
and error: "C:\Users\sapslaj\Desktop\chat-build-desktop\..\chat\mainlogin.h:21: error: expected ';' before '*' token"
I have tried everything I know possible, and I cannot get it to stay open. Any help?
Bookmarks