two forms in main one after the other one?
what do i do so when newForm1 closes the other one (newForm2) shows...
Code:
#include <QtGui/QApplication>
#include "newForm1.h"
#include "newForm2.h"
int main( int argc, char *argv[] )
{
newForm1 n;
n.show();
newForm2 w;
w.show();
return app.exec();
}
Re: two forms in main one after the other one?
Reimplement closeEvent() in newForm1, emit custom "closed()" signal there and connect it to "show()" slot in newForm2 (don't call "show()" on newForm2 instance in that case).
Another way, make newForm1 derived from QDialog, and use exec() instead of show().