Hi;

Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::MainWindow)
  4. {
  5. ui->setupUi(this);
  6.  
  7. QFile file("E:/workplace/info.txt");
  8. QFile file1("E:/workplace/account_info.txt");
  9. if(file.exists() & file1.exists())
  10. {
  11. Form1 *frm1 = new Form1;
  12. frm1->setAttribute(Qt::WA_DeleteOnClose);
  13. frm1->setVisible(true);
  14. this->setVisible(false);
  15. frm1->setParent(0);
  16. }
  17. }
To copy to clipboard, switch view to plain text mode 

but output shows both window(mainwindow & form1). i need only the form1