Hi;
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
QFile file("E:/workplace/info.txt");
QFile file1
("E:/workplace/account_info.txt");
if(file.exists() & file1.exists())
{
Form1 *frm1 = new Form1;
frm1->setAttribute(Qt::WA_DeleteOnClose);
frm1->setVisible(true);
this->setVisible(false);
frm1->setParent(0);
}
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QFile file("E:/workplace/info.txt");
QFile file1("E:/workplace/account_info.txt");
if(file.exists() & file1.exists())
{
Form1 *frm1 = new Form1;
frm1->setAttribute(Qt::WA_DeleteOnClose);
frm1->setVisible(true);
this->setVisible(false);
frm1->setParent(0);
}
}
To copy to clipboard, switch view to plain text mode
but output shows both window(mainwindow & form1). i need only the form1
Bookmarks