C++ (Qt) void openbrowser() { QMdiArea* mdiarea = createmdiarea(); QMainWindow* browserwgt = new QMainWindow(this); QX11EmbedContainer browsercont; browsercont.show(); browsercont.setParent(browserwgt); QProcess *browserpr = new QProcess(&browsercont); browserpr->start("./gedit"); // esli budet rabotat, to gedit zamenu brauzerom Arora setCentralWidget(mdiarea); mdiarea->addSubWindow(browserwgt); }
BashQProcess: Destroyed while process is still running.
C++ (Qt) void openbrowser() { QMdiArea* mdiarea = createmdiarea(); QMainWindow* browserwgt = new QMainWindow(this); QX11EmbedContainer *browsercont = new QX11EmbedContainer(browserwgt); browsercont->show(); QProcess *browserpr = new QProcess; browserpr->setParent(browsercont); browserpr->start("./gedit"); browserwgt->setCentralWidget(browsercont); setCentralWidget(mdiarea); mdiarea->addSubWindow(browserwgt); }