Hi
I am modifyfing now in the program in documentation,I need to open child without text file
this fucntion is create child
void MainWindow::newFile()
{
MdiChild *child = createMdiChild();
child->newFile();
child->show();
}
MdiChild *MainWindow::createMdiChild()
{
MdiChild *child = new MdiChild;
workspace->addWindow(child);
connect(child, SIGNAL(copyAvailable(bool)),
cutAct, SLOT(setEnabled(bool)));
connect(child, SIGNAL(copyAvailable(bool)),
copyAct, SLOT(setEnabled(bool)));
return child;
}
void MainWindow::newFile()
{
MdiChild *child = createMdiChild();
child->newFile();
child->show();
}
MdiChild *MainWindow::createMdiChild()
{
MdiChild *child = new MdiChild;
workspace->addWindow(child);
connect(child, SIGNAL(copyAvailable(bool)),
cutAct, SLOT(setEnabled(bool)));
connect(child, SIGNAL(copyAvailable(bool)),
copyAct, SLOT(setEnabled(bool)));
return child;
}
To copy to clipboard, switch view to plain text mode
and this in mdichild
MdiChild::MdiChild()
{
setAttribute(Qt::WA_DeleteOnClose);
isUntitled = true;
}
MdiChild::MdiChild()
{
setAttribute(Qt::WA_DeleteOnClose);
isUntitled = true;
}
To copy to clipboard, switch view to plain text mode
plz help me,again I need the cild window with text file document just the child window apear.thanks
Bookmarks