16,211
社区成员
发帖
与我相关
我的任务
分享
QProcess::startDetached("notepad.exe");
WId wid = 0;
do
{
QEventLoop loop;
QTimer::singleShot(1, &loop, SLOT(quit()));
loop.exec();
wid = (WId)FindWindowW(L"Notepad", NULL);
}while(wid == 0);
QWindow *m_window;
m_window = QWindow::fromWinId(wid);
QWidget *widget_Main = QWidget::createWindowContainer(m_window,this);
this->setCentralWidget(widget_Main);
加延时可以工作哦.