//首先获取第三方窗口id //类型可通过vs的spy工具获取 WId id = (WId)FindWindow(L"GUIClassName", L"ProgramName"); if(id == 0) return; //获取窗口 QWindow *window; window = QWindow::fromWinId(id); if(!window) return; //将第三方窗口放入widget中 QWidget* widget; widget = QWidget::createWindowContainer(window, this, Qt::Widget); ui->verticalLayout->addWidget(widget);